Ionic 2 Cant Find Module


#1

Im upgrading ionic 2beta10 to 2.0.1 and i got this last error ?

Uncaught Error: Cannot find module "../../node_modules/chart.js/src/chart.js"
at Object.<anonymous> (main.js:58322)
at __webpack_require__ (bootstrap 646f53b…:19)
at Object.<anonymous> (main.js:40167)
at __webpack_require__ (bootstrap 646f53b…:19)
at Object.<anonymous> (main.js:102627)
at __webpack_require__ (bootstrap 646f53b…:19)
at Object.<anonymous> (main.js:91302)
at __webpack_require__ (bootstrap 646f53b…:19)
at Object.<anonymous> (.*$:7)
at __webpack_require__ (bootstrap 646f53b…:19)

Has anybody come across this issue? How can it be resolved?


#2

yeah you are using chart.js somewhere and ionic 2 final is using webpack which searchs imports in node_modules

e.g.

from 'chart.js/src/chart.js'

#3

Hello bengtler you seem to be resolving these issues rather quickly i keep getting this error when i use ionic serve

Error: Cannot find module "…/modals/mSocialShare/mSocialShare"
at Object. (http://localhost:8100/build/main.js:59502:7)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:104722:75)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:93455:73)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:126005:70)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at http://localhost:8100/build/main.js:66:18


#4

depends where you are and where modals folder lives in your app.

your_app
|- src
  |- modals
    |- mSocialShare
      |- mSocialShare.ts
  |- anotherFolder
    |- youAreHere.ts

#5

Thank you for getting back to me this is my layout sir


#6

importing from my app.module.ts file


#7

found my issue boss!. Thank you


#8

Hello sir would you have any insight on Using Media Capture plugin with iOS error IONIC: Failed to load resource: unsupported URL