angular-cli: a new project with 0.37 doesn't run with ng serve
- OSX 10.11.3
angular-cli: 0.0.37 node: 4.4.3 os: darwin x64
-
create a new project with
ng new p
cd into the project and runng serve
project doesn’t start and dumps a log to console
Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman for more info. Cannot read property ‘sourceDir’ of undefined TypeError: Cannot read property ‘sourceDir’ of undefined at new Angular2App (/Users/eleitch/tmp/p/node_modules/angular-cli/lib/broccoli/angular2-app.js:30:40) at module.exports (/Users/eleitch/tmp/p/angular-cli-build.js:6:10) at Class.module.exports.Task.extend.setupBroccoliBuilder (/Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:55:19) at Class.module.exports.Task.extend.init (/Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:89:10) at new Class (/Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/node_modules/core-object/core-object.js:18:12) at Class.module.exports.Task.extend.run (/Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/lib/tasks/serve.js:15:19) at /Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/lib/commands/serve.js:64:24 at lib$rsvp$$internal$$tryCatch (/Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16) at lib$rsvp$$internal$$invokeCallback (/Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17) at /Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11 at lib$rsvp$asap$$flush (/Users/eleitch/tmp/p/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9) at nextTickCallbackWith0Args (node.js:420:9) at process._tickCallback (node.js:349:13)
Select one of the following:
I am filing a bug.
In this case you need the following information:
- OS. Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
- Versions. Please run
ng --version
. If there’s nothing outputted, please run in a Terminal:
node --version
npm --version
npm info angular-cli
And paste the result here. 3. Repro steps. Tell us exactly what you did and how you came to the failure. If you can give us steps from the moment you created an empty application, even better! Please try to be as descriptive as you can; this will avoid unnecessary back and forth. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc. 4. The log given by the failure. Normally this include a stack trace and some more information. 5. Mention any other details that might be useful.
Thanks! We’ll be in touch soon.
I am filing a feature request.
Unfortunately, for now, although we accept proposals, it will be probably be deferred. It’s not that we don’t want to hear you, it’s that we’re focusing on the beta release and as such we want to keep things a bit tidier than it will be once this is out in the open.
We’re not closed to good ideas, we simply have a limited amount of bandwidth. There’s only 24 hours per day.
I want customer support / I don’t know how to do X.
This is unfortunately not the right place. Please join the discussion on gitter, Stack Overflow or twitter and don’t be afraid to post your questions there. A FAQ will be created with those and it will help answer questions other people might have as well.
I want to help!
Please read our contributing guidelines; https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md
If you really want to be part of the crew and start cracking, try to contact us on gitter. We’re never really far and we might have something just for you!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (4 by maintainers)
@Federico-Comesana we recently added https://github.com/angular/angular-cli#updating-angular-cli, it should help you upgrade.
I solved the problem. The generated angular-cli.json file is missing a few new properties. The defaults property was missing. I also had to add the sourceDir child property. After adding these it worked again.