jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 400 forks source link

How can I import npm modules #441

Closed surjitkumar25 closed 7 years ago

surjitkumar25 commented 7 years ago

hi I am trying to use an npm module but got this error Error: [$injector:modulerr] Failed to instantiate module app.components due to: Error: [$injector:modulerr] Failed to instantiate module material.components.keyboard due to: Error: [$injector:nomod] Module 'material.components.keyboard' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

flick36 commented 7 years ago

Did you use npm angular-material-keyboard --save ?

giulioprinaricotti commented 7 years ago

Bump: what can be the issue? I successfully installed angular-upload using npm but angular-translate doesn't seem to be recognized. Module is always not available. I used both

npm install angular-translate --save-dev and bower install angular-translate --save-dev

I run gulp watch and gulp and the module name seems to be in public//build/js/final-....js

(BTW love the project..)

giulioprinaricotti commented 7 years ago

(Leave a note for my future self or anyone else having the same problem)

Use --save and not --save-dev

WRONG: bower install angular-translate --save-dev

OK: bower install angular-translate --save

then everything goes as smooth as the rest of project