'I can't install npm or node js in my git bash folder named phaser3-project-template
whenever I type npm install in my git bash terminal there is an error that says
> [email protected] postinstall C:\Users\Bea Beangca\Desktop\phaser\phaser3-project-template\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node lib/post_install.js`
npm ERR! Exit status 1
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! C:\Users\Bea Beangca\AppData\Roaming\npm-cache\_logs\2021-09-08T06_30_15_228Z-debug.log
And when I type ls in my git bash terminal, it will show that I downloaded node_modules
$ ls
LICENSE README.md assets/ build/ index.html node_modules/ package-lock.json package.json src/ webpack.config.js
$ npm run start
> [email protected] start C:\Users\Bea Beangca\Desktop\phaser\phaser3-project-template
> npm run build && webpack-dev-server --port=8000
'npm' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npm run build && webpack-dev-server --port=8000`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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! C:\Users\Bea Beangca\AppData\Roaming\npm-cache\_logs\2021-09-08T06_34_12_381Z-debug.log
Solution 1:[1]
It looks like your git bash doesn't have node installed. I only think that because it says npm is not recognized as an internal or external command
If I'm correct I believe your solution would be to install either nvm or nodejs. Are you using Windows?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | BrandonTheGuest |
