Coder Social home page Coder Social logo

Comments (6)

webketje avatar webketje commented on June 14, 2024

It looks like the OS doesn't have NodeJS in the executables environment variable PATH, or it is differently named (one of the lines says sh: node: command not found). But even so, this should not happen so I will release a bugfix that will make sure the command never hard-fails.

If you have access to the CLI (I suppose this is in a CI run), try running which node to confirm. Also possible perhaps is that it is available as nodejs. A quickfix can be done by finding the path of the Node binary on the OS and adding it to PATH, eg. run sth like this before NPM does its thing

export PATH=$PATH;/path/to/node/binary

from metalsmith.

antonio-masotti avatar antonio-masotti commented on June 14, 2024

@webketje Thanks a lot for the quick replay.

node is there and is working. If I run which node or node -v I get the correct output. It seems to me that the metalsmith-migrated-plugins.js is not found for some reasons when called while installing npm i -g @quasar/cli.

I will however also try by explicitely exporting the Node path.

from metalsmith.

webketje avatar webketje commented on June 14, 2024

Yw, this page contains additional info that may be relevant https://www.reddit.com/r/linuxquestions/comments/f9pwqz/binsh_not_reading_binary_from_usrlocalbin/

Correction on my previous reply: it should be "it looks like the shell doesn't have acces to the node binary." And the path assignment should be with a colon instead of semicolon. Sorry about that

from metalsmith.

delbug avatar delbug commented on June 14, 2024

me too

Cannot find module '/root/.nvm/versions/node/v14.8.0/lib/node_modules/vue-cli/node_modules/metalsmith/metalsmith-migrated-plugins.js'

from metalsmith.

webketje avatar webketje commented on June 14, 2024

@antonio-masotti please report back if you found the cause for this issue. I cannot reproduce it locally (and I don't have Amplify)
The only approaches I have are appending || 0 after the postinstall script so that it always sends back a 0 code (basically ignoring the error) or putting the script in a bin with a shebang instructing the shell to use node

@delbug are you using a very outdated version of the vue-cli? (eg 2.5.0) Newer versions do not use metalsmith.

from metalsmith.

webketje avatar webketje commented on June 14, 2024

Further observations:

  • The postinstall script somehow runs in a different shell than the main shell (eg dash instead of bash) which does not have node in its PATH env var. In that case, try to run npm config set scripts-prepend-node-path true before doing npm i -g @quasar/cli.
  • A solution that works if no other dependencies do a post-install: npm config set ignore-scripts true
  • In @delbug's case it looks as if the NodeJS version used in the postinstall script is different from the one used to npm install vue-cli. Make sure you didn't accidentally switch Node versions with nvm and installed from a separate terminal
  • Can be hotfixed in ms by using an "or" operator "cmd || exit 0" (the script is not critical so it's ok to ignore failure). To be checked if this is windows-compatible

from metalsmith.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.