Code Monkey home page Code Monkey logo

Comments (9)

 avatar commented on May 18, 2024 2

Had the same problem on Fedora 23, using various node and npm versions. I found this solution that worked for me:
Related: angular/angular#6097
Another reference that contains some interesting links in the comments:
http://stackoverflow.com/questions/34399445/angular-2-quickstart-live-server-error

from quickstart.

wardbell avatar wardbell commented on May 18, 2024

I'm sorry but I cannot duplicate.

Works fine for me. What is your environment? What node version? What did you clone?

Are you updating or starting from scratch? If updating, is it possible that you have multiple shim versions for the same shim library in your typings folder (due to update of the typings package)? If so, you could try deleting the typings folder and running npm run typings install. The easiest thing maybe to discard your current clone and clone again.

Please note that a clone of this repo is intended for one-time use. It's not designed to be updated and that usage will not be supported.

My Console Log

On Windows, node v.5.6, npm v.3.6.0 ... after the following ...

  • clone the repo for beta.11, (commit 0fb8db4)
  • npm install
  • npm start

... I see this (and the app displays in the browser) ...

> npm start

> [email protected] start C:\github\_angular-quickstart
> concurrently "npm run tsc:w" "npm run lite"

[1]
[1] > [email protected] lite C:\github\_angular-quickstart
[1] > lite-server
[1]
[0]
[0] > [email protected] tsc:w C:\github\_angular-quickstart
[0] > tsc -w
[0]
[1] Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults...
[1] ** browser-sync options **
[1] { injectChanges: false,
[1]   files: [ './**/*.{html,htm,css,js}' ],
[1]   server: { baseDir: './', middleware: [ [Function], [Function] ] } }
[0] 4:30:33 PM - Compilation complete. Watching for file changes.
[1] [BS] Access URLs:
[1]  -------------------------------------
[1]        Local: http://localhost:3000
[1]     External: http://192.168.1.80:3000
[1]  -------------------------------------
[1]           UI: http://localhost:3001
[1]  UI External: http://192.168.1.80:3001
[1]  -------------------------------------
[1] [BS] Serving files from: ./
[1] [BS] Watching files...
[1] 16.03.19 16:30:35 200 GET /index.html
[1] 16.03.19 16:30:36 200 GET /styles.css
[1] 16.03.19 16:30:36 200 GET /node_modules/es6-shim/es6-shim.min.js
[1] 16.03.19 16:30:36 200 GET /node_modules/angular2/es6/dev/src/testing/shims_for_IE.js
[1] 16.03.19 16:30:36 200 GET /node_modules/systemjs/dist/system-polyfills.js
[1] 16.03.19 16:30:36 200 GET /node_modules/angular2/bundles/angular2-polyfills.js
[1] 16.03.19 16:30:37 200 GET /node_modules/systemjs/dist/system.src.js
[1] 16.03.19 16:30:37 200 GET /node_modules/rxjs/bundles/Rx.js
[1] 16.03.19 16:30:38 200 GET /node_modules/angular2/bundles/angular2.dev.js
[1] 16.03.19 16:30:39 200 GET /app/main.js
[1] 16.03.19 16:30:39 200 GET /app/app.component.js

from quickstart.

Foxandxss avatar Foxandxss commented on May 18, 2024

I cannot replicate it either. Node 5.5.0, npm 3.7.2 and OSX.

from quickstart.

kazemihabib avatar kazemihabib commented on May 18, 2024

I tried cloning https://github.com/angular/quickstart and I tried do it with copy the files in https://angular.io/docs/ts/latest/tutorial/ and do npm install in both windows and linux.
I also updated the npm and node to latest version.
It can detect the changes and transpile TypeScript to JavaScript but it can not refresh browser and sometimes server terminates with exit code 1

from quickstart.

jc275 avatar jc275 commented on May 18, 2024

Using xubuntu 14.04, node v4.4.0, npm v2.14.20. [edit: installing npm v3.8.2 didn't help.]

Followed the instructions on https://angular.io/docs/ts/latest/quickstart.html

The following opens index.html in a new browser tab, but fails to live-update it.

$ npm start

> [email protected] start /home/jonathan/workspace/angular2-quickstart
> concurrently "npm run tsc:w" "npm run lite" 

[1] 
[1] > [email protected] lite /home/jonathan/workspace/angular2-quickstart
[1] > lite-server
[1] 
[0] 
[0] > [email protected] tsc:w /home/jonathan/workspace/angular2-quickstart
[0] > tsc -w
[0] 
[1] Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults...
[1] ** browser-sync options **
[1] { injectChanges: false,
[1]   files: [ './**/*.{html,htm,css,js}' ],
[1]   server: { baseDir: './', middleware: [ [Function], [Function] ] } }
[1] [BS] Access URLs:
[1]  ------------------------------------
[1]        Local: http://localhost:3000
[1]     External: http://192.168.1.2:3000
[1]  ------------------------------------
[1]           UI: http://localhost:3001
[1]  UI External: http://192.168.1.2:3001
[1]  ------------------------------------
[1] [BS] Serving files from: ./
[1] [BS] Watching files...
[1] 16.03.21 10:14:30 304 GET /index.html
[0] 10:14:33 AM - Compilation complete. Watching for file changes.
[1] 16.03.21 10:14:34 304 GET /styles.css
[1] 16.03.21 10:14:34 304 GET /node_modules/es6-shim/es6-shim.min.js
[1] 16.03.21 10:14:34 304 GET /node_modules/systemjs/dist/system-polyfills.js
[1] 16.03.21 10:14:34 304 GET /node_modules/angular2/es6/dev/src/testing/shims_for_IE.js
[1] 16.03.21 10:14:34 304 GET /node_modules/angular2/bundles/angular2-polyfills.js
[1] 16.03.21 10:14:34 304 GET /node_modules/systemjs/dist/system.src.js
[1] [BS] File changed: app/app.component.js
[1] [BS] File changed: app/main.js
[1] 16.03.21 10:14:34 304 GET /node_modules/rxjs/bundles/Rx.js
[1] 16.03.21 10:14:34 304 GET /node_modules/angular2/bundles/angular2.dev.js
[1] 16.03.21 10:14:36 200 GET /app/main.js
[1] 16.03.21 10:14:37 200 GET /app/app.component.js
[1] events.js:141
[1]       throw er; // Unhandled 'error' event
[1]       ^
[1] 
[1] Error: watch node_modules/typings/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/readable-stream/lib/_stream_passthrough.js ENOSPC
[1]     at exports._errnoException (util.js:870:11)
[1]     at FSWatcher.start (fs.js:1234:19)
[1]     at Object.fs.watch (fs.js:1262:11)
[1]     at createFsWatchInstance (/home/jonathan/workspace/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:37:15)
[1]     at setFsWatchListener (/home/jonathan/workspace/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:80:15)
[1]     at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/jonathan/workspace/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:228:14)
[1]     at FSWatcher.NodeFsHandler._handleFile (/home/jonathan/workspace/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:255:21)
[1]     at FSWatcher.<anonymous> (/home/jonathan/workspace/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:473:21)
[1]     at FSReqWrap.oncomplete (fs.js:82:15)
[1] 
[1] npm
[1]  
[1] ERR!
[1]  Linux 3.19.0-51-generic
[1] npm
[1]  
[1] ERR!
[1]  
[1] argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "lite"
[1] npm ERR! node v4.4.0
[1] npm ERR! 
[1] npm  v2.14.20
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! [email protected] lite: `lite-server`
[1] npm ERR! Exit status 1
[1] npm ERR! 
[1] npm ERR! Failed at the [email protected] lite script 'lite-server'.
[1] npm ERR! This is most likely a problem with the angular2-quickstart package,
[1] npm ERR! not with npm itself.
[1] npm ERR! Tell the author that this fails on your system:
[1] npm ERR!     lite-server
[1] npm ERR! You can get information on how to open an issue for this project with:
[1] npm ERR!     npm bugs angular2-quickstart
[1] npm ERR! Or if that isn't available, you can get their info via:
[1] npm ERR! 
[1] npm ERR!     npm owner ls angular2-quickstart
[1] npm ERR! There is likely additional logging output above.
[1] 
[1] npm
[1]  
[1] ERR!
[1]  Please include the following file with any support request:
[1] npm ERR!     /home/jonathan/workspace/angular2-quickstart/npm-debug.log
[1] npm run lite exited with code 1

npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'lite' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prelite', 'lite', 'postlite' ]
5 info prelite [email protected]
6 info lite [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec lite script
9 verbose stack Error: [email protected] lite: `lite-server`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:827:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd /home/jonathan/workspace/angular2-quickstart
12 error Linux 3.19.0-51-generic
13 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "lite"
14 error node v4.4.0
15 error npm  v2.14.20
16 error code ELIFECYCLE
17 error [email protected] lite: `lite-server`
17 error Exit status 1
18 error Failed at the [email protected] lite script 'lite-server'.
18 error This is most likely a problem with the angular2-quickstart package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     lite-server
18 error You can get information on how to open an issue for this project with:
18 error     npm bugs angular2-quickstart
18 error Or if that isn't available, you can get their info via:
18 error
18 error     npm owner ls angular2-quickstart
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

console.log

angular2.dev.js:361 Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
http://localhost:3000/browser-sync/socket.io/?EIO=3&transport=polling&t=1458559034473-0 Failed to load resource: net::ERR_CONNECTION_REFUSED
angular2-polyfills.js:258 Uncaught TypeError: Cannot read property 'zone' of undefined
http://localhost:3000/browser-sync/socket.io/?EIO=3&transport=polling&t=1458559036089-1 Failed to load resource: net::ERR_CONNECTION_REFUSED
angular2-polyfills.js:258 Uncaught TypeError: Cannot read property 'zone' of undefined
http://localhost:3000/browser-sync/socket.io/?EIO=3&transport=polling&t=1458559038866-2 Failed to load resource: net::ERR_CONNECTION_REFUSED
angular2-polyfills.js:258 Uncaught Error: More tasks executed then were scheduled.

from quickstart.

jc275 avatar jc275 commented on May 18, 2024

Related: johnpapa/lite-server#54

from quickstart.

Foxandxss avatar Foxandxss commented on May 18, 2024

We updated the quickstart to all the latest versions.

Could we confirm if this is still a problem?

Thank you.

from quickstart.

bengy avatar bengy commented on May 18, 2024

I also had the same issue (fs.inotify.max_user_watches was too low) but it works now. I think the problem is that lite-server watches all files, including node_modules, which totals in about 10600 files. This may be fixed by this pull request.

from quickstart.

wardbell avatar wardbell commented on May 18, 2024

Closing as this is not a QS issue

from quickstart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.