Unable to import with SystemJS
See original GitHub issueHi,
Sorry to bother you with that but I am unable to use SystemJS to import your plugin.
I have added to the map
object of systemJs :
'notifications': 'node_modules/angular2-notifications'
And to the packages
object :
'notifications': { main: 'components.js', defaultExtension: 'js' }
Then in my component ts file, I just do :
import { SimpleNotificationsComponent } from 'notifications'
However, when I run tsc
, I always have this error : app/components/core/app/app.component.ts(4,46): error TS2307: Cannot find module 'notifications
Am I doing something wrong ?
Thanks in advance
Regards
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
systemjs/errors.md at main - GitHub
System.js treats failing import maps as a warning. It skips the failed import map and moves on processing the next one if present....
Read more >Error trying to import 'systemjs' to use import dynamically
I am trying to use SystemJS to import a module that lives on an external server ... Error: Module not found: Error: Can't...
Read more >systemjs/systemjs - Gitter
Hi everyone! I'm getting Error: Unable to resolve bare specifier in my unit tests which makes sense because no import map exists here...
Read more >The Recommended Setup - Single SPA
The single-spa core team recommends using SystemJS + import maps as a module loader for the microfrontends. Alternatively, you may use global variables...
Read more >Troubleshooting Order Hub customizations - IBM
Unable to resolve bare specifier ... To resolve this issue: Check the import-map.json file and see the paths starts with a forward slash...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I simply have not been able to get this to work with Angular-CLI.
I don’t know what the “note about defining directories in angular-cli-builder” means. Where should you add this code?
It would help a lot if you could write a more detailed set of instructions for Angular CLI.
If I could work out how implement this with Angular-CLI I would happily write something and create a PR.
@johnnyPescarul I had the same problem, fixed it by changing the name of the module in system.config.js to “angular2-notifications”.
system.config.js:
component.ts:
import {NotificationsService, SimpleNotificationsComponent} from "angular2-notifications"