angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

have issues while installing Angular CLI

Open ovais opened this issue 10 years ago • 15 comments

Please provide us with the following information:

Windows 10

Also tried using both normal and Admin access.

here is the log

C:\WINDOWS\system32>npm install -g angular-cli npm WARN peerDependencies The peer dependency webpack@* included from html-webpack-plugin will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

[email protected] install C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\angular2-template-loader\node_modules\codecov\node_modules\execSync node install.js

[execsync v1.0.2] Attempting to compile native extensions. { [Error: spawn node-gyp ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn node-gyp', path: 'node-gyp', spawnargs: [ 'rebuild' ] } [execSync v1.0.2] Native code compile failed!! Will try to use win32 extension. npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130 npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue /

[email protected] install C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download: https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v46-win32-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp)
C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modul(node "" clean ) ode-gyp.js" clean ) else | | C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64 ) else (node "" configure --fallback-to-build --module=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64 ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64\zopfli.node" "--module_name=zopfli" "--module_path=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64" gyp ERR! cwd C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli gyp ERR! node -v v4.5.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:87:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:829:16) stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) node-pre-gyp ERR! System Windows_NT 10.0.14393 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli node-pre-gyp ERR! node -v v4.5.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.30 node-pre-gyp ERR! not ok Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli\lib\binding\node-v46-win32-x64' (1) npm WARN optional dep failed, continuing [email protected] npm WARN optional dep failed, continuing [email protected] npm WARN deprecated [email protected]: This package has been discontinued in favor of lodash@^4.0.0. \

[email protected] install C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-sass node scripts/install.js

Start downloading binary at https://github.com/sass/node-sass/releases/download/v3.10.0/win32-x64-46_binding.node Binary downloaded and installed at C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-sass\vendor\win32-x64-46\binding.node

[email protected] postinstall C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-sass node scripts/build.js

"C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-sass\vendor\win32-x64-46\binding.node" exists. testing binary. Binary is fine; exiting. C:\Users\aoa\AppData\Roaming\npm\ng -> C:\Users\aoa\AppData\Roaming\npm\node_modules\angular-cli\bin\ng 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" "-g" "angular-cli" npm ERR! node v4.5.0 npm ERR! npm v2.15.9 npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer [email protected] wants webpack@* npm ERR! peerinvalid Peer [email protected] wants webpack@^1.1.0 || ^2 || ^2.1.0-beta npm ERR! peerinvalid Peer [email protected] wants webpack@^1.12.6 || ^2.1.0-beta npm ERR! peerinvalid Peer [email protected] wants webpack@1 || 2 || ^2.0.0-beta || ^2.1.0-beta npm ERR! peerinvalid Peer [email protected] wants webpack@^2.1.0-beta

npm ERR! Please include the following file with any support request: npm ERR! C:\WINDOWS\system32\npm-debug.log

ovais avatar Sep 20 '16 20:09 ovais

@ovais Try running npm install --global --production windows-build-tools then try installing the CLI again. The previous command installs the C++ compilers that node-gyp needs. Windows by default does not have these installed and unfortunately this is just a quirk of working with nodejs on windows. https://www.npmjs.com/package/windows-build-tools

coryrylan avatar Sep 21 '16 02:09 coryrylan

Same error here. Tried different things. Gave up for the moment.

Windows 7 Node: v6.6.0 npm: 3.10.8

I read in another post that it should not be a requirement to install windows-build-tools, which also installs python 2.7.11 and takes foverer to finish the installation (i did it anyway, but didnt help).

Looking at the log and for what i can understand, execsync v1.0.2 fails to compile native extensions and because of that falls back to node-gyp, which requires windows-build-tools for Windows. Is this correct?

ghost avatar Sep 21 '16 04:09 ghost

@splintercode Any way around for MAC users ? using- Mac X El Capitan ( Version - 10.11. 3)

spillai98 avatar Sep 21 '16 09:09 spillai98

I can confirm that running npm install --global --production windows-build-tools WILL NOT fix this.

adiachenko avatar Sep 21 '16 13:09 adiachenko

I am getting the same errors on my Windows 10 install; looks like it can't find zopfli and then attempts to use python, which isn't installed.

Nullception avatar Sep 21 '16 20:09 Nullception

i had same problem and noticed that angular-cli requires npm 3.x.x to be installed, after updating npm it could be installed npm install npm -g

jcgomeztg avatar Sep 22 '16 02:09 jcgomeztg

I'm following the instructions in Upgrade from Beta.10 to Beta.14 trying to migrate to angular-cli@latest, running on Windows 10. I have deleted node_modules, tmp and dist, upgraded the npm version, run the uninstall, cache clean and install, and I'm getting an error: angular-cli error

lekova avatar Sep 23 '16 21:09 lekova

@ovais as @jcgomeztg mentioned, Angular CLI needs npm 3. The errors you are getting (npm ERR! peerinvalid) are due to npm 2.

@lekova there was a bug with beta.15 I believe, that gave you that message. Try beta.16 and if the problem persists please open a new issue.

filipesilva avatar Oct 03 '16 22:10 filipesilva

I has this problem too.. I use this to fixed - Update Nodejs to version 4. update NPM to latest -> npm install npm@latest -g -> npm remove -g angular-cli -> npm cache clean and them install angular-cli -> npm install -g angular-cli

luismanuelmansilla avatar Oct 09 '16 23:10 luismanuelmansilla

I had the same issue and after following luismanuelmansilla suggestions, I could install it. I have verified the installation with the commands "ng new" and "ng serve".

Chembeti avatar Oct 16 '16 04:10 Chembeti

With "npm install -g angular-cli", new projects get angular release candidate bits and no modules. When I try "npm install -g angular-cli@latest" I get the same issues listed above. I am also on Window 10; I did try installing the windows-build-tools. I also tried "npm install npm -g" as suggested to only have that blow up too. I am currently at npm 3.0.0 and node 4.6.1.

joe-vella avatar Oct 22 '16 17:10 joe-vella

SUCCESS! I ran "npm install npm@latest -g" which worked; I am now at npm 3.10.9. I then ran "npm install angular-cli@latest" which also, finally, worked and installed angular-cli 1.0.0-beta.18. I can now create a new project (at the correct angular2 version) and run it.

joe-vella avatar Oct 22 '16 18:10 joe-vella

@joe-vella 's solution worked for me

grantmarch avatar Dec 18 '16 15:12 grantmarch

I have faced and fixed this issue relates node-sass and python error.Try installing latest angular cli command with the steps below

Set the system variable path as well: C:\Users\windowsusername\AppData\Roaming\npm

C:\Users\windowsusername\AppData\Roaming\npm\node_modules@angular\cli\bin;

C:\Program Files\nodejs;

Then start using angular cli command prompt using: angular client project folder path>npm install -g @angular/cli@latest

angular client project folder path>npm install -g node-gyp

SatishMHiremath avatar Feb 17 '18 22:02 SatishMHiremath

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.