Comments (13)
Workaround is to do update the symlinks in ${install_path}/bin
to point to the npm-installed one:
# change "8.10.0" to whatever node version you use
cd ~/.asdf/installs/nodejs/8.10.0/bin
ln -nfs ../.npm/bin/npm npm
ln -nfs ../.npm/bin/npx npx
Here's a bash one-liner to do this for all Node.js versions you have installed:
for ver in ~/.asdf/installs/nodejs/*/bin; do cd $ver; if [ -f ../.npm/bin/npm ]; then ln -nfs ../.npm/bin/npm npm; ln -nfs ../.npm/bin/npx npx; fi done
This is not ideal, but it should at least make it work to get you out of possibly-insecure legacy npm versions until #56 is addressed.
from asdf-nodejs.
@psantos10 yep => #56
cd ~/.asdf/installs/nodejs/9.11.1/lib && npm update npm
from asdf-nodejs.
(I know that this is a very dated issue but somehow I was bitten by this recently in a dated environment and thought to share my experience here)
This is what helped me out:
npm install -g [email protected]
asdf update
asdf plugin-update nodejs
asdf reshim
npm --version
# => 6.1.0
First I had issues like @MOPineyro here #57 (comment) but asdf plugin-update nodejs
seemed to do the trick.
from asdf-nodejs.
duplicate of #56
from asdf-nodejs.
Hi @Ihackalot
Did you solve this issue?
I am having the same issue here:
$ node -v
v9.11.1
$ npm -v
5.8.0
$ npm i -g npm
npm i -g npm
/Users/psantos/.asdf/installs/nodejs/9.11.1/.npm/bin/npm -> /Users/psantos/.asdf/installs/nodejs/9.11.1/.npm/lib/node_modules/npm/bin/npm-cli.js
/Users/psantos/.asdf/installs/nodejs/9.11.1/.npm/bin/npx -> /Users/psantos/.asdf/installs/nodejs/9.11.1/.npm/lib/node_modules/npm/bin/npx-cli.js
+ [email protected]
updated 1 package in 10.787s
$ asdf reshim nodejs
$ npm -v
5.8.0
I trying to restart the console, the computer and nothing changed. Same issue
from asdf-nodejs.
@Ihackalot unfortunately this tip does not work:
$ npm -v
5.8.0
$ cd ~/.asdf/installs/nodejs/9.11.1/lib && npm update npm
$ asdf reshim nodejs
$ npm -v
5.8.8
$ which node
/Users/psantos/.asdf/shims/node
$ which npm
/Users/psantos/.asdf/shims/npm
Same issue 😞
from asdf-nodejs.
Which asdf version are you running? Try to asdf update
and asdf plugin-update nodejs
. It works for me running asdf v0.4.3.
from asdf-nodejs.
asdf and nodejs plugin are updated.
$ asdf --version
0.4.3
$ asdf update
HEAD is now at bcc959f Update version to 0.4.3
Updated asdf to release v0.4.3
$ asdf plugin-update nodejs
Updating nodejs...
Already up to date.
$ npm i -g npm
/Users/psantos/.asdf/installs/nodejs/9.11.1/.npm/bin/npm -> /Users/psantos/.asdf/installs/nodejs/9.11.1/.npm/lib/node_modules/npm/bin/npm-cli.js
/Users/psantos/.asdf/installs/nodejs/9.11.1/.npm/bin/npx -> /Users/psantos/.asdf/installs/nodejs/9.11.1/.npm/lib/node_modules/npm/bin/npx-cli.js
+ [email protected]
updated 1 package in 11.868s
$ asdf reshim nodejs
$ npm -v
5.8.0
Same issue
from asdf-nodejs.
Coming from #56 (comment) workaround by @rstacruz works for me thanks
from asdf-nodejs.
workaround by @rstacruz isn't working for me. Any suggestions as to why?
$ npm i -g npm
/Users/manuelpineyro/.asdf/installs/nodejs/8.11.2/.npm/bin/npm -> /Users/manuelpineyro/.asdf/installs/nodejs/8.11.2/.npm/lib/node_modules/npm/bin/npm-cli.js
/Users/manuelpineyro/.asdf/installs/nodejs/8.11.2/.npm/bin/npx -> /Users/manuelpineyro/.asdf/installs/nodejs/8.11.2/.npm/lib/node_modules/npm/bin/npx-cli.js
+ [email protected]
updated 1 package in 11.44s
$ asdf --version
v0.4.3
$ asdf update
M defaults
HEAD is now at bcc959f... Update version to 0.4.3
Updated asdf to release v0.4.3
$ asdf plugin-update nodejs
Updating nodejs...
Already up-to-date.
$ npm i -g npm
/Users/manuelpineyro/.asdf/installs/nodejs/8.11.2/.npm/bin/npm -> /Users/manuelpineyro/.asdf/installs/nodejs/8.11.2/.npm/lib/node_modules/npm/bin/npm-cli.js
/Users/manuelpineyro/.asdf/installs/nodejs/8.11.2/.npm/bin/npx -> /Users/manuelpineyro/.asdf/installs/nodejs/8.11.2/.npm/lib/node_modules/npm/bin/npx-cli.js
+ [email protected]
updated 1 package in 11.4s
$ cd ~/.asdf/installs/nodejs/8.11.2/bin
$ ln -nfs ../.npm/bin/npm npm
$ ln -nfs ../.npm/bin/npx npx
$ asdf reshim nodejs
$ npm -v
5.3.0
from asdf-nodejs.
Wasn't working for me either, did an update of asdf and the nodejs plugin and it now works fine in a new shell.
from asdf-nodejs.
I believe this has been address under #56 and the related issues.
from asdf-nodejs.
Me too: (I know that this is a very dated issue but somehow I was bitten by this recently in a dated environment and thought to share my experience here)
The only thing that helped me was #57 (comment)
Is this something that was fixed?
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.