Yarn error "no such option" with --dev flag - yarnpkg

ignite-ir-boilerplate was not able to be installed. Is it a valid NPM module?
Command failed: yarn add ignite-ir-boilerplate --dev
Usage: yarn [options]
yarn: error: no such option: --dev

You probably installed yarn using this:
$ apt install cmdtest
Use this instead:
$ npm install --global yarn

Add sudo before, works for me,
sudo yarn add --dev babel-plugin-module-resolver

Related

How to update Heroku?

how do I update my Heroku , my windows terminal shows the following :
» Warning: heroku update available from 7.47.7 to 7.52.0.
please help
You have to run
heroku update
in the terminal to update the CLI.
If that doesn't work, this means you have the CLI app as an npm or an apt package, in that case you have to run
apt installation:
sudo apt-get update && sudo apt-get upgrade heroku
npm:
npm upgrade -g heroku
yarn:
yarn global upgrade heroku
Refer to the article here for more information.

Laravel 8, NPM Wepback API configuration problem, using Yarn on Ubuntu 20.04

Using npm run dev results in the error:
Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. configuration.module.rules[10] has an unknown property 'loaders'
Jetstream Version: 1.6
Jetstream Stack: Livewire
Laravel Version: 8.14
PHP Version: 7.3.0
Database Driver & Version: MySQL v8.0
Steps to reproduce:
Navigate to directory hosting Laravel 8 project
Run command rm -rf node_modules and wait for the command to complete
Run command rm package-lock.json
Run command npm cache clear --force
Run command sudo npm install --global npm - this updates NPM (Node Package Manager)
Run command sudo yarnpkg install
Run command sudo yarnpkg add babel#latest
Run command sudo yarnpkg add webpack#latest
Run command sudo yarnpkg add webpack-cli#latest
Run command sudo yarnpkg add vue-template-compiler --save-dev --production=false
Run command sudo yarnpkg add sass-loader#8.* sass --save-dev --production=false
Run command sudo npm install --global cross-env
Run command yarnpkg run dev
NPM is supposed to return a success message, but clearly something is either broken or misconfigured...
Problem has been solved through either an NPM or Yarn update

Why doesn't yarn updated when running upgrade?

I'm trying to use latest yarn version after upgrading it.
I've follow over https://yarnpkg.com/en/docs/install#mac-stable instructions, but yarn didn't really upgraded.
After running brew upgrade yarn:
$ brew upgrade yarn
Updating Homebrew...
Error: yarn 1.9.4 already installed
And after running yarn --version:
$ yarn --version
1.9.2
Is there any way to use the latest version?
Although the guide says that brew upgrade yarn should do it automatically..
There's a lengthy thread on Github regarding upgrades; here's what is suggested for HomeBrew:
brew upgrade yarn
brew link --overwrite yarn
Then try yarn -v
If that fails then you could:
First, uninstall brew's yarn:
brew uninstall yarn
Removing yarn binaries manually:
rm -f /usr/local/bin/yarnpkg
rm -f /usr/local/bin/yarn
Remove yarn cache:
rm -rf ${HOME}/.yarn
If you have the following in your .zshrc or .bash_profile, remove it:
export PATH="$PATH:`yarn global bin`"
Install via curl:
curl -o- -L https://yarnpkg.com/install.sh | bash
Make sure there is the following line in your .zshrc or .bash_profile:
export PATH="$HOME/.yarn/bin:$PATH"
↳ Github : yarn update discussion thread
If you installed yarn with npm in an nvm environment then you can just run npm -g upgrade yarn. To check that run which yarn -- if you see .nvm in the result of that, you are in an nvm environment.

Gulp installation error on Laravel in Ubuntu

I run npm install gulp in Ubuntu. Show this error:
My Server is Ubuntu 16.04.
Framework is Laravel 5.6.
ERROR: npm is known not to run on Node.js v4.2.6
Node.js 4 is supported but the specific version you're running has
a bug known to break npm. Please update to at least 4.7.0 to use this
version of npm. You can find the latest release of Node.js at https://nodejs.org/
I run node -v show this message: v4.2.6
I run sudo apt-get install --only-upgrade nodejs show this message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (9.11.1-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
How to solve this problem?
Try this.. First, Uninstall completely nodejs and npm.
sudo apt remove nodejs npm
Then, reinstall it:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
Refer: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Try:
sudo apt-get update
sudo apt-get install nodejs (you already have node so this step is probably not required)
sudo npm install -g gulp
That should resolve your issue.

Yarn add --dev returning --> yarn: error: no such option: --dev

I have looked at this post:
Yarn error "no such option" with --dev flag but it did not work for me. I did the npm install --global yarn and it did not work.
yarn version: 0.27
node version: 9.6.1
npm version: 5.6.0
linux-ubuntu: 17.10
commad being run:
yarn add --dev nodemon babel-cli babel-preset-env babel-preset-stage-3
from #Wangai you probably installed $ apt install yarn
Instead use $ sudo npm install --global yarn, then run your command.
Reference: Yarn error "no such option" with --dev flag
I had a similar problem while running the command:
yarn add --dev eslint prettier eslint-config-airbnb#^15.0.1 eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y#^5.1.1
yarn: error: no such option: --dev
adding sudo to the command helped me!
sudo npm install --global yarn

Resources