Issues using Angular CLI for the first time
I'm new to Angular2 and wanted to try out the CLI tools, but unfortunately I had some issues setting it up. After installing CLI using npm, I received a warning on the console that the watcher is missing (this is not listed in the prerequisites). I installed it via homebrew according to http://ember-cli.com/user-guide/#watchman and the message went away.
Then I started creating a new project via "ng new" and the directory including its content was created without issues. However, after switching to the new directory and using "ng serve", I get an error: Could not require 'angular-cli-build.js': Cannot find module 'glob' Error: Could not require 'angular-cli-build.js': Cannot find module 'glob'
It seems that a javascript dependency is missing, but I'm not sure if this should be part of the CLI project or if I have to install it manually before using CLI somehow (if so, I'd expect it to appear in the prerequisites section).
I documented all the steps and the console output here: http://pastebin.com/dstXXCXR
Please let me know if there's other information you need to reproduce the issue.
My Setup:
- OS. Mac OSX El Capitan
- Versions. angular-cli: 0.0.33 node: 5.10.1 os: darwin x64
- Repro steps.
- The log given by the failure. Normally this include a stack trace and some more information.
- Mention any other details that might be useful. See http://pastebin.com/dstXXCXR
@thorstenschaefer the watchman issue you can ignore, as ng-cli falls back to the default file watch system.
The issue you run into with ng serve is because there's a missing dependency glob. This is a know issue, and fixed in master. Will go out in the next release.
For now you can fix it by running:
npm install --save glob
Inside your project.
/cc @Brocco
Thanks Pascal, used your fix and ng serve is running now.
@thorstenschaefer FYI the PR to fix this is already merged, it will be part of the next release (PR: #473)
In the meantime you can just install glob inside your project... npm i glob --save-dev
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.