Comments (6)
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.
@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.
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.
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.
@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.
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 doingnpm 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)
- "TypeError: gen.next is not a function" - Metalsmith 2.5.0 HOT 5
- error HOT 1
- drag and drop theme builder HOT 4
- Add Metalsmith.watch method?
- CLI - init command HOT 1
- MS files should not depend on Object prototype
- Debug not working as expected? HOT 2
- Don't crash on broken symlinks that are ignored HOT 4
- Proposal for metalsmith.get/set() helpers HOT 1
- Metalsmith 2.6 Roadmap HOT 3
- Ordinary html file not recognized as utf-8 encoded, stopping gray-matter to parse YAML HOT 3
- Launch procedure to deprecate @types/metalsmith HOT 2
- Build callback not fired with `watch()` + async plugins HOT 13
- Feature: add encoding: utf-8 property to `File` HOT 1
- Feature: provide metalsmith.on('built')
- Unhandled rejection when using callbacks (i.e. with `.watch(spec)`) HOT 2
- CLI: parse metalsmith.json as front-matter
- UnhandledPromiseRejection when plugins callback with failure HOT 8
- Remove metalsmith.concurrency?
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 metalsmith.