Comments (4)
I don't regularly use yarn
and pnpm
so I'm not sure exactly what your issue is. But I do know that in asdf everything is versioned. So if you install something for for NodeJS 11 it's only going to be available in directories that are using NodeJS 11.
Something else you might try is doing something like:
ASDF_NODEJS_VERSION=11.0.0 yarn
See https://github.com/asdf-vm/asdf#set-current-version for more info on those environment variables.
from asdf-nodejs.
Thanks, I will test and will let you know.
I was thinking maybe I use curl to install yarn then install pnpm globally from yarn.
I will keep asdf for node version management. Yarn and pnpm are useful for front-end projects with a lot of dependencies.
from asdf-nodejs.
root@Mohsen-PC:/mnt/c/Users/Mohsen# export ASDF_NODEJS_VERSION=11.0.0 yarn
root@Mohsen-PC:/mnt/c/Users/Mohsen# npm install -g yarn
/root/.asdf/installs/nodejs/11.0.0/.npm/bin/yarn -> /root/.asdf/installs/nodejs/11.0.0/.npm/lib/node_modules/yarn/bin/yarn.js
/root/.asdf/installs/nodejs/11.0.0/.npm/bin/yarnpkg -> /root/.asdf/installs/nodejs/11.0.0/.npm/lib/node_modules/yarn/bin/yarn.js
npm WARN lifecycle The node binary used for scripts is /root/.asdf/shims/node but npm is using /root/.asdf/installs/nodejs/11.0.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> [email protected] postinstall /root/.asdf/installs/nodejs/11.0.0/.npm/lib/node_modules/yarn
> /root/.asdf/installs/nodejs/11.0.0/.npm/lib/node_modules/.hooks/postinstall
sh: 1: /root/.asdf/installs/nodejs/11.0.0/.npm/lib/node_modules/.hooks/postinstall: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] postinstall: `/root/.asdf/installs/nodejs/11.0.0/.npm/lib/node_modules/.hooks/postinstall`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-11-01T14_14_54_335Z-debug.log
However I was able to install yarn via apt-get
and then add pnpm
globally there.
So now I am using yarn for my global packages and asdf for local installs.
from asdf-nodejs.
@Stratus3D I was able to install globally with npm install -g --unsafe-perm=true --allow-root --scripts-prepend-node-path
. In my case the problem was that I am using a WSL and it only comes with root
user (though you can create more) because the user is already logged in as a Windows user. So because my user was root
I had to allow it via npm
And it seems like it is running .hook/postinstall
for every package which makes it very slow.
I recommend closing the issues that were resolved with asdf reshim
(I took a look some users had said that they were able to resolve with this) and focus on better handling of this postinstall script.
from asdf-nodejs.
Related Issues (20)
- Issues in running test scripts from Eclipse with Appium shim HOT 1
- Resolving LTS version only outputs major number HOT 4
- npm shim should work without $HOME HOT 5
- Unable to install 18.18.1 HOT 1
- import-release-team-keyring not found HOT 1
- NodeJS 18.18.2 is not in the list! HOT 2
- Can't install 21.0.0 HOT 4
- bug: asdf cannot resolve config paths with whitespace in them HOT 2
- Last version is 20.5.1 but Node is already at 21.0.2 HOT 1
- asdf cant find definition for v18.19.0 HOT 2
- Dependency on nvm HOT 1
- How to install Nodejs latest LTS version? HOT 1
- default-npm-packages support registry
- asdf: Warn: You have configured asdf to preserve downloaded files (with always_keep_download=yes or --keep-download). But asdf: Warn: the current plugin (nodejs) does not support that. Downloaded files will not be preserved. HOT 2
- not using project .tool-versions to set node version in tmux
- Is it possible to show the LTS version in the list of versions right after installing the plugin?
- Cannot install node 21.7.x HOT 2
- Cannot install latest lts [email protected] HOT 2
- feat: Node.js nightly (v22) install
- WARNING: node-v21.7.2-darwin-arm64 is in LTS Maintenance mode and nearing its end of life. It only receives *critical* security updates, *critical* bug fixes and documentation updates. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asdf-nodejs.