-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
angular-cli v1.1.0
macOS Sierra
node 6.10.0
Repro steps.
I just updated angular-cli (v1.1) and created a new project using ng new.
Then I added and installed two dependencies to the project.json file:
"dependencies": {
...
"toastr": "2.1.2",
"spin": "0.0.1"
},
"devDependencies": {
...
"@types/toastr": "2.1.32",
"@types/spin": "2.3.30",
...
"typescript": "~2.3.3"
}
and to angular-cli.json:
"scripts": [
"../node_modules/toastr/build/toastr.min.js",
"../node_modules/spin/dist/spin.min.js"
],
Then I updated the autogenerated app.component.ts adding this constructor:
constructor() {
toastr.success('Hi')
}
The IDE (visual studio code) recognize correctly the types but when I serve the application using ng serve I get the following error.
(I have a couple of project started 2 or 3 months ago and everything works fine)
The log given by the failure.
ERROR in ../A/src/app/app.component.ts (15,5): C
annot find name 'toastr'.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels