Comments (4)
To @HashNuke and other asdf folks: might I suggest falling back to $HOME/.tool-versions in the event that no .tool-versions is found? There are some npm packages that like to build in /tmp.
This should be the case with the recent versions of asdf. I am going to close this issue. Please open a new issue if this problem isn't fully resolved.
from asdf-nodejs.
npm WARN lifecycle The node binary used for scripts is /Users/jason/.asdf/shims/node but npm is using /Users/jason/.asdf/installs/nodejs/8.10.0/bin/node itself. Use the
--scripts-prepend-node-path
option to include the path for the node binary npm was executed with.
This issue should not be a big deal.
from asdf-nodejs.
No version set for nodejs
- Can you try
asdf global nodejs 8.10.0
then try again? - Okay, so that probably won't work. Can you try
cd /tmp; asdf local nodejs 8.10.0
and then install it again?
If 2
works, then it's probably because serverless is building in /tmp
, and asdf doesn't have a version of nodejs available for that path.
To @HashNuke and other asdf folks: might I suggest falling back to $HOME/.tool-versions
in the event that no .tool-versions
is found? There are some npm packages that like to build in /tmp
.
from asdf-nodejs.
1
worked for me, thanks!
Jasons-MBP-2% npm install -g serverless
/Users/jason/.asdf/installs/nodejs/8.10.0/.npm/bin/slss -> /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless/bin/serverless
/Users/jason/.asdf/installs/nodejs/8.10.0/.npm/bin/serverless -> /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless/bin/serverless
/Users/jason/.asdf/installs/nodejs/8.10.0/.npm/bin/sls -> /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless/bin/serverless
npm WARN lifecycle The node binary used for scripts is /Users/jason/.asdf/shims/node but npm is using /Users/jason/.asdf/installs/nodejs/8.10.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 /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless/node_modules/spawn-sync
> node postinstall
> [email protected] postinstall /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless/node_modules/spawn-sync
> /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/.hooks/postinstall
> [email protected] postinstall /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless
> node ./scripts/postinstall.js
[tabtab] Adding source line to load /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh
in /Users/jason/.zshrc
[tabtab] Adding source line to load /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh
in /Users/jason/.zshrc
> [email protected] postinstall /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/serverless
> /Users/jason/.asdf/installs/nodejs/8.10.0/.npm/lib/node_modules/.hooks/postinstall
+ [email protected]
added 310 packages in 18.453s
To @HashNuke and other asdf folks: might I suggest falling back to $HOME/.tool-versions in the event that no .tool-versions is found? There are some npm packages that like to build in /tmp.
That sounds like a good idea to me. Also maybe setting a global version should be recommended more heavily, although if you have 2 different npm versions installed and you want to install a package globally it is annoying to have to switch your asdf global
to match asdf current
.
from asdf-nodejs.
Related Issues (20)
- 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
- Failed to find Node 20.13.0 (LTS) 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.