Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack (demo) problem #147

Closed
the01 opened this issue Mar 7, 2018 · 2 comments · Fixed by #152
Closed

Webpack (demo) problem #147

the01 opened this issue Mar 7, 2018 · 2 comments · Fixed by #152

Comments

@the01
Copy link

the01 commented Mar 7, 2018

I was having trouble getting it up and running in an angular-webpack app (macOS) and got the following error:

ModuleNotFoundError: Module not found: Error: Can't resolve '@angular/common' in '<path>/node_modules/angular2-toaster/src'

So I tried the demo:

$ git clone https://github.com/Stabzs/Angular2-Toaster.git
$ cd Angular2-Toaster/demo/webpack 
$ npm i
$ npm start

which threw the following error:

ERROR in ./src/app.module.ts
Module not found: Error: Can't resolve 'angular2-toaster' in '<path>/Angular2-Toaster/demo/webpack/src'
 @ ./src/app.module.ts 26:0-49
 @ ./src/main.ts
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts

ERROR in ./src/app.component.ts
Module not found: Error: Can't resolve 'angular2-toaster' in '<path>/Angular2-Toaster/demo/webpack/src'
 @ ./src/app.component.ts 11:0-65
 @ ./src/app.module.ts
 @ ./src/main.ts
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts
webpack: Failed to compile.

On a side note: wouldn't it be a better example, if the actual version from npm was used?

@the01
Copy link
Author

the01 commented Mar 7, 2018

However, version 4.0.1 seems to work

@Stabzs
Copy link
Owner

Stabzs commented Mar 7, 2018

I will have to take a look at the webpack example. It may be out of date. the demo/angular-cli example is the most up-to-date demo.

Stabzs added a commit that referenced this issue Mar 16, 2018
- Typescript compilation was failing for implicit any conversions for object typings for the configuration of showCloseButton, timeout, iconClasses and typeClasses. The type arguments have been strengthened to make more rigid compilation happy.  This should not affect anyone who was not abusing the expected typed arguments.
Closes #150, closes #148.

- The webpack demo has been rebuilt against `[email protected]` and webpack 4.
Closes #147.
@Stabzs Stabzs mentioned this issue Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants