Problem with import library v7 (angular2)
See original GitHub issueHi, i have problem when try import library like this import ‘dsmorse-gridster/dist/jquery.gridster.min.js’ In console i have next error:
Can't resolve './jquery.coords.js'
Can't resolve './utils.js'
Can't resolve './jquery.collision.js'
Can't resolve './jquery.draggable.js'
Problem have because in code have part which try add library if current library was imported.
In library part this is next code if (typeof exports === ‘object’) { module.exports = factory(require(‘jquery’), require(‘./jquery.draggable.js’), require(‘./jquery.collision.js’), require(‘./jquery.coords.js’), require(‘./utils.js’)); } Can you fixe it please. This urgent for me 😃 Thks And sorry for my bad english.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Build error 'Module not found' when importing local library in ...
I have found the error, two simple mistakes: Import statement: This DOES NOT work: import { DiaryShootClientLibService } from ...
Read more >angular2-polyfills.js gives error when incorporating javascript ...
It's a weird problem: I seem to be able to build and run when there is only 1 line of code from the...
Read more >Creating libraries - Angular
Anything exported from this file is made public when your library is imported into an application. Use an NgModule to expose services and...
Read more >Making your Angular 2 library statically analyzable for AoT
Note: This error only appears when using the library in an app that is compiled with the angular cli. (Not when using ngc...
Read more >Angular 2 Errors - Dave Ceddia
From Igor: This is a problem with polyfilling ES Modules. Something outside of Angular, and in fact a well known issue with all...
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 find solution. I copy folder src from github to my project. But this very bad solution. And i want ask you add to npm folder src with all file which you use for library Because all project based on ES6/typescript will try import library which not exist in dist folder.
This list import which code can’t find
Thank you
I have the same problem!