I am setting up the environment for my first AngularJS application.I am referring this link.
I get the following error:
/////////////////////////////Command/////////////////////////////////////
D:\FrontEnd>node --version
v6.9.1
//////////////////////////////Command////////////////////////////////////
D:\FrontEnd>npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
})
D:\FrontEnd>npm start
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! missing script: start
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! D:\FrontEnd\npm-debug.log
D:\FrontEnd>
Can anyone help me on this??
i think you miss the start tag in the package.json add this
"scripts": {
"start": "node yourScript.js"
}
Related
Angular version 1.4
Bitbucket pipeline failed at NPM Install. here are the logs
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.3.2
(node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/karma/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ws#8.2.3 requires a peer of bufferutil#^4.0.1 but none was installed.
npm WARN ws#8.2.3 requires a peer of utf-8-validate#^5.0.2 but none was installed.
npm WARN dashboardApp#0.0.0 No repository field.
npm WARN dashboardApp#0.0.0 No license field.
npm ERR! Linux 5.13.0-1031-aws
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.11.4
npm ERR! npm v3.10.10
npm ERR! path /opt/atlassian/pipelines/agent/build/node_modules/.staging/#types/node-43f1e04b/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/opt/atlassian/pipelines/agent/build/node_modules/.staging/#types/node-43f1e04b/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /opt/atlassian/pipelines/agent/build/npm-debug.log
After cloning the react boilerplate when I ran the npm run setup its show error.
PS D:\React\react-boilerplate> npm run setup
> react-boilerplate#4.0.0 presetup D:\React\react-boilerplate
> npm i chalk shelljs
> pngquant-bin#5.0.2 postinstall D:\React\react-boilerplate\node_modules\pngquant-bin
> node lib/install.js
‼ Command failed: D:\React\react-boilerplate\node_modules\pngquant-bin\vendor\pngquant.exe --version
‼ pngquant pre-build test failed
i compiling from source
× Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (D:\React\react-boilerplate\node_modules\execa\index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
npm WARN connected-react-router#6.4.0 requires a peer of react-redux#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-styled-components#6.3.1 requires a peer of styled-components#^2.0.0 || ^3.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin#5.0.2 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin#5.0.2 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\Coder\AppData\Roaming\npm-cache\_logs\2019-07-17T11_03_29_890Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-boilerplate#4.0.0 presetup: `npm i chalk shelljs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-boilerplate#4.0.0 presetup 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\Coder\AppData\Roaming\npm-cache\_logs\2019-07-17T11_03_30_260Z-debug.log
you must run npm i chalk shelljs, then npm run setup
When I am trying to run this command, it through error and NPM does not install completely.
Before this version of Node.js I also installed node-v8.9.1-x64.msi, but their same issue I was facing that's why I uninstalled and installed node-v6.11.0-x64
But still, I am not able to solve this issue.
Node Version: v6.11.0
NPM Version: 3.10.0
Error Message:
D:\angular\NPM>npm install -g #angular/cli
C:\Users\XXX\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\#a
ngular\cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "#angular/cli"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! path C:\Users\XXX\AppData\Roaming\npm\node_modules\.staging\rxjs-8d
1ee8eb
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\XXX\AppData
\Roaming\npm\node_modules\.staging\rxjs-8d1ee8eb' -> 'C:\Users\XXX\AppData\R
oaming\npm\node_modules\#angular\cli\node_modules\rxjs'
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\instal
l\action\finalize.js:25:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-f
s\polyfills.js:264:29
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\XXX\AppData
\Roaming\npm\node_modules\.staging\rxjs-8d1ee8eb' -> 'C:\Users\XXX\AppData\R
oaming\npm\node_modules\#angular\cli\node_modules\rxjs'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, rename 'C:\Users\XXX\AppD
ata\Roaming\npm\node_modules\.staging\rxjs-8d1ee8eb' -> 'C:\Users\XXX\AppDat
a\Roaming\npm\node_modules\#angular\cli\node_modules\rxjs'
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\instal
l\action\finalize.js:25:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-f
s\polyfills.js:264:29
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\XXX\AppData
\Roaming\npm\node_modules\.staging\rxjs-8d1ee8eb' -> 'C:\Users\XXX\AppData\R
oaming\npm\node_modules\#angular\cli\node_modules\rxjs'
npm ERR! at Error (native) parent: '#angular/cli' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! D:\angular\NPM\npm-debug.log
npm ERR! code 1
Normally I'd say "use it with sudo" like
sudo npm install -g #angular/cli
But since you are on Windows, try with an elevated command prompt.
In other words: Start your console (CMD) as Administrator and run the command again.
If that doesn't work, type
npm cache clean
And then just run
npm install -g #angular/cli
again.
For Angular 4+ project development, you should use latest node version v8.8.9. So that you won't face any errors related to any modules.
I have same issue while trying to install #angular/cli
I found the node.js version I had installed was 6.10. Then I upgraded my node.js to 8.10.0 and tried:
npm install -g #angular/cli works fine.
The old version of npm doesn't support new features of Angular.
I have tried multiple times to install angular-cli in my ubuntu 16.04, but everytime I got failed. I am using node version 6.9.1 and npm version 3.10.8. I'm enclosing the errors here in this post.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/angular-cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN #angular/compiler-cli#0.6.4 requires a peer of #angular/compiler#2.0.2 but none was installed.
npm WARN #angular/compiler-cli#0.6.4 requires a peer of #angular/platform-server#2.0.2 but none was installed.
npm WARN #angular/compiler-cli#0.6.4 requires a peer of #angular/core#2.0.2 but none was installed.
npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli#latest"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-e9ea1451
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-e9ea1451' -> '/usr/local/lib/node_modules/angular-cli/node_modules/npm/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-e9ea1451' -> '/usr/local/lib/node_modules/angular-cli/node_modules/npm/node_modules/abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/pc/Downloads/node-v6.9.1/npm-debug.log
npm ERR! code 1
Does anyone have a fix?
https://github.com/angular/angular-cli/issues/1190
Try running
sudo npm uninstall -g angular-cli
sudo npm install-g angular-cli
I'm new with angularjs and I'm following a course to learn it but I got an issue while installing grunt locally, and this is the error I get:
C:\wamp\www\Projets\AngularJS>npm install grunt --save-dev
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt" "--save-dev"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package karma#1.3.0 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer karma-jasmine#1.0.2 wants karma#*
npm ERR! peerinvalid Peer karma-phantomjs-launcher#1.0.2 wants karma#>=0.9
npm ERR! peerinvalid Peer gulp-karma#0.0.4 wants karma#>=0.10 <=0.13
npm ERR! Please include the following file with any support request:
npm ERR! C:\wamp\www\Projets\AngularJS\npm-debug.log
I've executed the command line as administrator while doing this but still getting this error.
Thnx in advance for your time.
It's a known issue that is solved by upgrading your npm with npm 3.
You can do it by :
npm install -g npm#3
or
upgrade your nodejs to nodejs 6 who come with npm 3 by default
From npm 3 the peerdependencies will generate WARN instead of ERR
Hope it will help you to solve your problem.