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

Please help. This is using latest node js v7.1.0

Open PacejetRepository opened this issue 10 years ago • 45 comments

Windows 10

ng new FirstApp

D:\2016\BeGreatWithNg>ng new FirstApp Cannot find module '@angular/core' Error: Cannot find module '@angular/core' at Function.Module._resolveFilename (module.js:472:15) at Function.Module._load (module.js:420:25) at Module.require (module.js:500:17) at require (internal/module.js:20:19) at Object. (C:\Users\TETAY\AppData\Roaming\npm\node_modules\angular-cli\node_modules@ngtools\webpack\src\plugin.js:5:14) at Module._compile (module.js:573:32) at Object.Module._extensions..js (module.js:582:10) at Module.load (module.js:490:32) at tryModuleLoad (module.js:449:12) at Function.Module._load (module.js:441:3) at Module.require (module.js:500:17) at require (internal/module.js:20:19) at Object. (C:\Users\TETAY\AppData\Roaming\npm\node_modules\angular-cli\node_modules@ngtools\webpack\src\index.js:6:10) at Module._compile (module.js:573:32) at Object.Module._extensions..js (module.js:582:10) at Module.load (module.js:490:32) at tryModuleLoad (module.js:449:12) at Function.Module._load (module.js:441:3) at Module.require (module.js:500:17)

PacejetRepository avatar Nov 16 '16 07:11 PacejetRepository

This has just been fixed. You should uninstall and reinstall again. Sorry for the inconvenience.

hansl avatar Nov 16 '16 07:11 hansl

I did all that and nothing happened?

PacejetRepository avatar Nov 16 '16 07:11 PacejetRepository

What version do you see with ng version?

hansl avatar Nov 16 '16 08:11 hansl

angular-cli: 1.0.0-beta.20-4 node: 7.1.0 os: win32 x64

PacejetRepository avatar Nov 16 '16 08:11 PacejetRepository

npm install -g angular-cli 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. 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]: 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 C:\Users\TETAY\AppData\Roaming\npm\ng -> C:\Users\TETAY\AppData\Roaming\npm\node_modules\angular-cli\bin\ng C:\Users\TETAY\AppData\Roaming\npm -- [email protected] +-- @angular/[email protected] +-- @angular/[email protected] |-- @angular/[email protected] +-- @angular/[email protected] +-- [email protected] `-- [email protected]

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 [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

PacejetRepository avatar Nov 16 '16 08:11 PacejetRepository

Not sure what to tell you, but it works locally here. It seems you are installing @angular/core. If you do npm list, what does it say?

hansl avatar Nov 16 '16 08:11 hansl

I feel this is a case where you are in a directory with an invalid node_modules.

hansl avatar Nov 16 '16 08:11 hansl

What do you mean? Now i get this error

D:\2016\BeGreatWithNg\First-App>ng serve ** NG Live Development Server 7261ms building modules 2ms add01297ms 115ms asset43ms emittingevents.js:160 throw er; // Unhandled 'error' event ^

Error: This socket is closed at WriteStream.Socket._writeGeneric (net.js:683:19) at WriteStream.Socket._write (net.js:734:8) at doWrite (_stream_writable.js:334:12) at writeOrBuffer (_stream_writable.js:320:5) at WriteStream.Writable.write (_stream_writable.js:247:11) at WriteStream.Socket.write (net.js:661:40) at WriteStream.process.stderr.write (D:\2016\BeGreatWithNg\First-App\node_modules\angular-cli\lib\cli\index.js:40:27) at Console.warn (console.js:51:16) at printErrorAndExit (D:\2016\BeGreatWithNg\First-App\node_modules\awesome-typescript-loader\node_modules\source-map-support\source-map-support.js:406:11) at process.emit (D:\2016\BeGreatWithNg\First-App\node_modules\awesome-typescript-loader\node_modules\source-map-support\source-map-support.js:419:16) at process._fatalException (bootstrap_node.js:292:26) 7023ms add11423ms 132ms asset43ms emitting events.js:160 throw er; // Unhandled 'error' event ^

Error: This socket is closed at WriteStream.Socket._writeGeneric (net.js:683:19) at WriteStream.Socket._write (net.js:734:8) at doWrite (_stream_writable.js:334:12) at writeOrBuffer (_stream_writable.js:320:5) at WriteStream.Writable.write (_stream_writable.js:247:11) at WriteStream.Socket.write (net.js:661:40) at WriteStream.process.stderr.write (D:\2016\BeGreatWithNg\First-App\node_modules\angular-cli\lib\cli\index.js:40:27) at Console.warn (console.js:51:16) at printErrorAndExit (D:\2016\BeGreatWithNg\First-App\node_modules\awesome-typescript-loader\node_modules\source-map-support\source-map-support.js:406:11) at process.emit (D:\2016\BeGreatWithNg\First-App\node_modules\awesome-typescript-loader\node_modules\source-map-support\source-map-support.js:419:16) at process._fatalException (bootstrap_node.js:292:26)

PacejetRepository avatar Nov 16 '16 08:11 PacejetRepository

you can close this now. I reverted back to v6.9.1 LTS and all my initial problems are gone. Please next time don;t release something that you haven't tested as working.

PacejetRepository avatar Nov 16 '16 09:11 PacejetRepository

@hansl @PacejetRepository I have the same issue using node 7.1.0 Why is this closed? I have had to revert back to v6.9.1 At this moment angular-cli is not compatible with node 7.1.0 I am using windows 10

jmesa-sistel avatar Nov 16 '16 14:11 jmesa-sistel

I have this very same issue on Windows 10.

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\browser-sync\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})```



After that installation stops.

jbeja avatar Dec 12 '16 23:12 jbeja

And the same issue on Ubuntu 16.04:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

jonasschulte avatar Jan 25 '17 21:01 jonasschulte

Folks, I am here after googling the same error as it pertains to setting up Swagger tools. I believe it is because I am running npm install inside the Linux Subsystem for Windows which is relatively new to Windows 10. My hypothesis is that the particular module is confused between the host OS (Windows 10) and the filesystem (Linux). @jonasschulte @jbeja @PacejetRepository are you running npm in cmd, Powershell, Git bash or LSW? Trying to see if we have a consistent pattern.

tforster avatar Jan 28 '17 01:01 tforster

The same issue on Deepin 15.3 x64 node v7.1.0. I reverted back to node v6.9.1 and same issue.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/ionic/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

WilfredLemus avatar Jan 28 '17 21:01 WilfredLemus

Looks similar to my warnings (node v6.9.4): 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 [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN @angular/[email protected] requires a peer of rxjs@^5.0.1 but none was installed.

Freddessson avatar Feb 08 '17 21:02 Freddessson

This is similar to the warning I had too while trying to install browser -sync. I am using a windows 10 and node version 6.9.5.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\browser-sync\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})

is there any way to correct the problem in order to clear the warning?

michaelAdewunmi avatar Feb 17 '17 20:02 michaelAdewunmi

same goes here. node v7.2.1 ubuntu 14.04

ngooide avatar Feb 23 '17 03:02 ngooide

Same here: node v7.6.0 Ubuntu 14.04.5 LTS

How to solve this? I'd appreciate a clean install without any issues.

Danilo-Araujo-Silva avatar Feb 26 '17 00:02 Danilo-Araujo-Silva

any update?

ghost avatar Mar 01 '17 02:03 ghost

Same here: node v7.7.1, npm 4.1.2 windows 10 x64 ...

Resolved: add option --no-optional at the end of command.

tolawho avatar Mar 07 '17 16:03 tolawho