Cannot find module 'ng2-sticky/ng2-sticky'
invot opened this issue · 1 comments
invot commented
Latest version of Angular 2 doesn't seem to want to import the script. Changing the import line to
import { Sticky } from 'ng2-sticky-kit/ng2-sticky-kit';
result in console error:
zone.js:101 GET http://localhost:4200/ng2-sticky-kit/ng2-sticky-kit 404 (Not Found)scheduleTask @ zone.js:101ZoneDelegate.scheduleTask @ zone.js:336Zone.scheduleMacroTask @ zone.js:273(anonymous function) @ zone.js:122send @ VM28545:3fetchTextFromURL @ system.src.js:1057(anonymous function) @ system.src.js:1778ZoneAwarePromise @ zone.js:584(anonymous function) @ system.src.js:1777(anonymous function) @ system.src.js:2806(anonymous function) @ system.src.js:3380(anonymous function) @ system.src.js:3692(anonymous function) @ system.src.js:4084(anonymous function) @ system.src.js:4547(anonymous function) @ system.src.js:4816(anonymous function) @ system.src.js:413ZoneDelegate.invoke @ zone.js:323Zone.run @ zone.js:216(anonymous function) @ zone.js:571ZoneDelegate.invokeTask @ zone.js:356Zone.runTask @ zone.js:256drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426
zone.js:461 Unhandled Promise rejection: (SystemJS) XHR error (404 Not Found) loading http://localhost:4200/ng2-sticky-kit/ng2-sticky-kit
Error: XHR error (404 Not Found) loading http://localhost:4200/ng2-sticky-kit/ng2-sticky-kit
at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:4200/vendor/zone.js/dist/zone.js:769:30)
at ZoneDelegate.invokeTask (http://localhost:4200/vendor/zone.js/dist/zone.js:356:38)
at Zone.runTask (http://localhost:4200/vendor/zone.js/dist/zone.js:256:48)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:4200/vendor/zone.js/dist/zone.js:423:34)
Error loading http://localhost:4200/ng2-sticky-kit/ng2-sticky-kit as "ng2-sticky-kit/ng2-sticky-kit" from http://localhost:4200/app/participant/informal-assessment/edit-informal-assessment/edit-informal-assessment.component.js ; Zone: <root> ; Task: Promise.then ; Value: Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:4200/ng2-sticky-kit/ng2-sticky-kit(…)consoleError @ zone.js:461_loop_1 @ zone.js:490drainMicroTaskQueue @ zone.js:494ZoneTask.invoke @ zone.js:426
zone.js:463 Error: Uncaught (in promise): Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:4200/ng2-sticky-kit/ng2-sticky-kit(…)
makseo commented
You need to add a package to your config of system.js
Also you can upgrade to 1.0.6. This version supports Agnular RC5.