简体   繁体   中英

Yeoman - generator-angular error at init app deployment

I have installed npm, Yeoman and got everything working, the webapp generator works like a charm. I want to get into angular development and therefore tested the generator-angular.

I did everything as stated in the readme file

npm install -g generator-angular

yo angular [app-name]

then

grunt

grunt serve

at grunt i got this error:

WARN [watcher]: Pattern "/home/user/angular/test/mock/* / .js" does not match any file. INFO [Chrome 31.0.1650 (Linux)]: Connected on socket 3juFgfMcw5Pm88-cve27 Chrome 31.0.1650 (Linux) Controller: MainCtrl should attach a list of awesomeThings to the scope FAILED Error: [$injector:modulerr] Failed to instantiate module testApp due to: Error: [$injector:unpr] Unknown provider: $routeProvider

The main error - is with "unknown" $routeProvider.
Check if ngRoute module has been loaded.
Also check that you propely injected it to your testApp module.
It would be great if you could provide your testApp code.

Also I guess that you have an error with regex (no escape symbol)

/home/user/angular/test/mock/**/*.js

Try this "/home/user/angular/test/mock/*\\.js"

/home/user/angular/test/mock/**/*\.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM