angular-cli is not installed in ubtunu 16.04 - angularjs

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

Related

React is not running

npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-barcode#1.4.1
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"^18.2.0" from the root project
npm ERR! peer react#">=16.8.4" from #ant-design/charts#1.4.2
npm ERR! node_modules/#ant-design/charts
npm ERR! #ant-design/charts#"^1.4.2" from the root project
npm ERR! 65 more (#ant-design/flowchart, #ant-design/graphs, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.0.0 || ^17.0.0" from react-barcode#1.4.1
npm ERR! node_modules/react-barcode
npm ERR! react-barcode#"^1.4.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"^16.0.0 || ^17.0.0" from react-barcode#1.4.1
npm ERR! node_modules/react-barcode
npm ERR! react-barcode#"^1.4.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\ghost\AppData\Local\npm-cache_logs\2023-01-24T07_50_41_550Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ghost\AppData\Local\npm-cache_logs\2023-01-24T07_50_41_550Z-debug-0.log
I tried npm install and this error is showing.
I also used npm start But it also showed error
npm WARN config global --global, --localare deprecated. Use--location=global` instead.
frontend#0.1.0 start
react-scripts start
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.`
This is due to the version of react-scripts did not match your project.
Run npm install react-scripts --save
Your project should be running fine

Error npm run setup "ERR! code ELIFECYCLE"

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

Error: npm install -g #angular/cli

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.

Error In Angular JS Setup

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"
}

npm install error npm ERR! Linux 3.2.0-79-generic-pae

I have a problem with my node and will not let me install .
armikhael#armikhael-MB40II:~/github/base-angular$ sudo npm install -g yo
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm ERR! Linux 3.2.0-79-generic-pae
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v5.8.0`
npm ERR! npm v3.7.3
npm ERR! code EJSONPARSE

Resources