Monaca debug error - Cannot find module 'angular2-onsenui'



  • Hi,

    I am new to Monaca and Angular. I have installed Monaca CLI and created onesenui 2 and angular 2 project in my local environment. When debugging the app using “monaca debug” command, I get the following error after successful build complete message. I am using macOS Sierra (FYI, I could see the tabbar project on my device in-spite of below error on angular2-onsenui). Please help.

    ERROR in ./src/main.ts
    (9,27): error TS2307: Cannot find module ‘angular2-onsenui’.

    ERROR in ./src/app/app.ts
    (2,27): error TS2307: Cannot find module ‘angular2-onsenui’.

    ERROR in ./src/main.ts
    Module not found: Error: Cannot resolve module ‘angular2-onsenui’ in /Users/yugamahesh/Mahesh/Monaca/mahtest2/src
    @ ./src/main.ts 15:25-52

    ERROR in ./src/vendor.ts
    Module not found: Error: Cannot resolve module ‘angular2-onsenui’ in /Users/yugamahesh/Mahesh/Monaca/mahtest2/src
    @ ./src/vendor.ts 14:0-27

    ERROR in ./src/app/app.ts
    Module not found: Error: Cannot resolve module ‘angular2-onsenui’ in /Users/yugamahesh/Mahesh/Monaca/mahtest2/src/app
    @ ./src/app/app.ts 12:25-52
    Project has failed to transpile. Error has occured while transpiling /Users/yugamahesh/Mahesh/Monaca/mahtest2 with webpack. Please check the logs.


  • Monaca

    Try to go the root of your project and run the following commands:

    npm install
    monaca reconfigure
    monaca debug

    Moreover, which template did you exactly create?


Log in to reply