angular / quickstart

Angular QuickStart - source from the documentation
MIT License
3.11k stars 3.14k forks source link

Error on npm start - No changes made to quickstart #404

Closed ahmerwaseem closed 6 years ago

ahmerwaseem commented 7 years ago

Getting the following errors, I made no changes, just did npm install then npm start.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'serve' ]
2 info using npm@3.10.10
3 info using node@v6.10.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle angular-quickstart@1.0.0~preserve: angular-quickstart@1.0.0
6 silly lifecycle angular-quickstart@1.0.0~preserve: no script for preserve, continuing
7 info lifecycle angular-quickstart@1.0.0~serve: angular-quickstart@1.0.0
8 verbose lifecycle angular-quickstart@1.0.0~serve: unsafe-perm in lifecycle true
9 verbose lifecycle angular-quickstart@1.0.0~serve: PATH: C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\Ahmer\My Documents\quickstart\node_modules\.bin;C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\Ahmer\My Documents\quickstart\node_modules\.bin;C:\Users\Ahmer\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Ahmer\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Git\cmd;C:\Users\Ahmer\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\nodejs;C:\Users\Ahmer\Anaconda3;C:\Users\Ahmer\Anaconda3\Scripts;C:\Users\Ahmer\Anaconda3\Library\bin;C:\Users\Ahmer\AppData\Local\Microsoft\WindowsApps;C:\Users\Ahmer\AppData\Local\atom\bin;C:\Users\Ahmer\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
10 verbose lifecycle angular-quickstart@1.0.0~serve: CWD: C:\Users\Ahmer\My Documents\quickstart
11 silly lifecycle angular-quickstart@1.0.0~serve: Args: [ '/d /s /c', 'lite-server -c=bs-config.json' ]
12 silly lifecycle angular-quickstart@1.0.0~serve: Returned: code: 1  signal: null
13 info lifecycle angular-quickstart@1.0.0~serve: Failed to exec serve script
14 verbose stack Error: angular-quickstart@1.0.0 serve: `lite-server -c=bs-config.json`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid angular-quickstart@1.0.0
16 verbose cwd C:\Users\Ahmer\My Documents\quickstart
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"
19 error node v6.10.0
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error angular-quickstart@1.0.0 serve: `lite-server -c=bs-config.json`
22 error Exit status 1
23 error Failed at the angular-quickstart@1.0.0 serve script 'lite-server -c=bs-config.json'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the angular-quickstart package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     lite-server -c=bs-config.json
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs angular-quickstart
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls angular-quickstart
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

$ npm start

> angular-quickstart@1.0.0 prestart C:\Users\Ahmer\My Documents\quickstart
> npm run build

> angular-quickstart@1.0.0 build C:\Users\Ahmer\My Documents\quickstart
> tsc -p src/

> angular-quickstart@1.0.0 start C:\Users\Ahmer\My Documents\quickstart
> concurrently "npm run build:watch" "npm run serve"

[0]
[0] > angular-quickstart@1.0.0 build:watch C:\Users\Ahmer\My Documents\quickstart
[0] > tsc -p src/ -w
[0]
[1]
[1] > angular-quickstart@1.0.0 serve C:\Users\Ahmer\My Documents\quickstart
[1] > lite-server -c=bs-config.json
[1]
[1] ** browser-sync config **
[1] { injectChanges: false,
[1]   files: [ './**/*.{html,htm,css,js}' ],
[1]   watchOptions: { ignored: 'node_modules' },
[1]   server:
[1]    { baseDir: 'src',
[1]      middleware: [ [Function], [Function] ],
[1]      routes: { '/node_modules': 'node_modules' } } }
[0] 9:44:32 AM - Compilation complete. Watching for file changes.
[1] events.js:160
[1]       throw er; // Unhandled 'error' event
[1]       ^
[1]
[1] Error: watch karma-test-shim.js EPERM
[1]     at exports._errnoException (util.js:1022:11)
[1]     at FSWatcher.start (fs.js:1429:19)
[1]     at Object.fs.watch (fs.js:1456:11)
[1]     at createFsWatchInstance (C:\Users\Ahmer\Documents\quickstart\node_modules\chokidar\                                                                                                    lib\nodefs-handler.js:37:15)
[1]     at setFsWatchListener (C:\Users\Ahmer\Documents\quickstart\node_modules\chokidar\lib                                                                                                    \nodefs-handler.js:80:15)
[1]     at FSWatcher.NodeFsHandler._watchWithNodeFs (C:\Users\Ahmer\Documents\quickstart\nod                                                                                                    e_modules\chokidar\lib\nodefs-handler.js:228:14)
[1]     at FSWatcher.NodeFsHandler._handleFile (C:\Users\Ahmer\Documents\quickstart\node_mod                                                                                                    ules\chokidar\lib\nodefs-handler.js:255:21)
[1]     at FSWatcher.<anonymous> (C:\Users\Ahmer\Documents\quickstart\node_modules\chokidar\                                                                                                    lib\nodefs-handler.js:473:21)
[1]     at FSReqWrap.oncomplete (fs.js:123:15)
[1]
[1] npm
[1]  ERR! Windows_NT 10.0.14393
[1] npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\node                                                                                                    js\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"
[1] npm ERR! node v6.10.0
[1] npm ERR!
[1]  npm  v3.10.10
[1] npm ERR!
[1]  code ELIFECYCLE
[1] npm ERR! angular-quickstart@1.0.0 serve: `lite-server -c=bs-config.json`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the angular-quickstart@1.0.0 serve script 'lite-server -c=bs-config.j                                                                                                    son'.
[1] npm
[1]  ERR! Make sure you have the latest version of node.js and npm installed.
[1] npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
[1] npm ERR! not with npm itself.
[1] npm ERR! Tell the author that this fails on your system:
[1] npm
[1]  ERR!     lite-server -c=bs-config.json
[1] npm
[1] ERR! You can get information on how to open an issue for this project with:
[1] npm ERR!     npm bugs angular-quickstart
[1] npm ERR! Or if that isn't available, you can get their info via:
[1] npm ERR!     npm owner ls angular-quickstart
[1] npm ERR! There is likely additional logging output above.
[1]
[1] npm ERR! Please include the following file with any support request:
[1] npm ERR!     C:\Users\Ahmer\My Documents\quickstart\npm-debug.log
[1] npm run serve exited with code 1
jlaurenzano commented 7 years ago

Having the same exact issue, did you figured it out?

tonymihut commented 7 years ago

Same issue here

roshankharel commented 7 years ago

same here

makarela commented 7 years ago

This problem occurred when i've used built-in terminal (in my case it was terminal in webstorm), try to type npm start in command line.

jlaurenzano commented 7 years ago

There is an issue on your code, check all your classes, components and so on, in my case, I was missing a bracket }

ahmerwaseem commented 7 years ago

I just switched to different directory, cloned, installed, and ran it, and it worked. I have no clue why.

Sourav2017 commented 7 years ago

Almost Same issue here. My case is like for first time with npm start it works fine.than it is started throwing the same error

jay-dee7 commented 7 years ago

make sure you guys don't have multiple angular apps running. I had one running on my port 4200 and when I tried to run another one, it throws the same error that you're talking about.

jay-dee7 commented 7 years ago

I don't think if there's any error in the quickstart, correct me if wrong.

Foxandxss commented 6 years ago

This repository is now deprecated. The Angular Quickstart project was a nice starting point for creating Angular applications. Now we recommend using the Angular CLI to create new Angular projects.

Starting from 1 November 2017, all the Angular documentation, at angular.io, is based on the Angular CLI.

Let's get started