New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn install with nvm #6667
Comments
Duplicate of #2821 |
Not sure if this will be helpful, but that output comes from this shell script https://github.com/yarnpkg/yarn/blob/master/bin/yarn#L31 specifically it uses as example output, on OSX using
|
/home/dev/.nvm/versions/node/v12.14.0/bin/node mi error: Yarn requires Node.js 4.0 or higher to be installed. |
Here I got this error because my .zshrc file was configured to set Yarn in PATH before configuring NVM. To fix this, I changed the line |
@JustOneJance I have similar problem and how I can investigated it related with husky. When I'm trying to commit from Webstorm it shows me error |
For me I found the solution:
as it described here https://github.com/typicode/husky#node-version-managers |
September 2021 update on @peakercope: Note that the file must be in your user's home directory |
i use Ubuntu
I have nvm:
nvm ls
v8.11.3
v8.11.4
-> v11.1.0
default -> 8.11.4 (-> v8.11.4)
node -> stable (-> v11.1.0) (default)
stable -> 11.1 (-> v11.1.0) (default)
I installed yarn with:
sudo apt-get install --no-install-recommends yarn
I also added in .bashrc alias node=nodejs. But when I try yarn install I see:
Yarn requires Node.js 4.0 or higher to be installed.
How can I fix it?
it happend only in my project. Which i download from gitlub.
package.json
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"preinstall": "sudo yarn global add prettifier eslint flow-bin",
"babel": "babel",
"dev": "webpack-dev-server",
"lint": "eslint",
"validate": "yarn list",
"prettify": "./node_modules/prettifier/bin/prettifier.js",
"precommit": "lint-staged",
"fmt": "prettier --write './**/.js'"
},
"devDependencies": {
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.2",
"@babel/node": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-flow": "^7.0.0",
"@webpack-contrib/config-loader": "^1.2.1",
"autoprefixer": "^9.3.1",
"babel-cli": "^6.26.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"babel-preset-react": "^6.24.1",
"css-loader": "^1.0.1",
"eslint": "^5.8.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-flowtype": "^3.2.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"flow-typed": "^2.5.1",
"husky": "^1.1.3",
"lint-staged": "^8.0.4",
"mini-css-extract-plugin": "^0.4.4",
"node-sass": "^4.10.0",
"postcss-loader": "^3.0.0",
"precommit-hook": "^3.0.0",
"prettier": "^1.15.2",
"react": "^16.6.0",
"react-dom": "^16.6.0",
"react-hot-loader": "^4.3.12",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"webpack": "^4.25.1",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"dependencies": {
"babel-preset-flow": "^6.23.0",
"flow-bin": "^0.85.0",
"uglifyjs-webpack-plugin": "^2.0.1"
},
"pre-commit": [
"lint",
"validate",
"flow check"
],
"lint-staged": {
".js": [
"prettier --write",
"git add"
]
},
The text was updated successfully, but these errors were encountered: