Base solution for your next web application
Open Closed

Getting some module not found issue on npm start #4717


User avatar
0
vrpatlola created

Hi, I am able to run Web.Host server side successfully. but having issue with angular project

I have install

  • Nodes 8.9.4
  • npm 5.6.0
  • agnular cli

But getting module not found error on "npm start"

ERROR in ./src/app/main/main.module.ts Module not found: Error: Can't resolve '@node_modules/angular2-counto' in 'D:\FBM\FBMSalesDemo\angular\src\app\main' ERROR in ./src/app/app.module.ts Module not found: Error: Can't resolve '@node_modules/ng2-file-upload' in 'D:\FBM\FBMSalesDemo\angular\src\app' ERROR in ./src/app/admin/admin.module.ts Module not found: Error: Can't resolve '@node_modules/ng2-file-upload' in 'D:\FBM\FBMSalesDemo\angular\src\app\admin' ERROR in ./src/app/admin/settings/tenant-settings.component.ts Module not found: Error: Can't resolve '@node_modules/ng2-file-upload' in 'D:\FBM\FBMSalesDemo\angular\src\app\admin\settings' ERROR in ./src/app/shared/layout/profile/change-profile-picture-modal.component.ts Module not found: Error: Can't resolve '@node_modules/ng2-file-upload' in 'D:\FBM\FBMSalesDemo\angular\src\app\shared\layout\profile'

Thank you!


5 Answer(s)
  • User Avatar
    0
    alirizaadiyahsi created

    Hi @vrpatlola, what is your project version? Could you remove node_modules folder, then run yarn command before npm start command?

  • User Avatar
    0
    vrpatlola created

    <cite>alirizaadiyahsi: </cite> Hi @vrpatlola, what is your project version? Could you remove node_modules folder, then run yarn command before npm start command?

    I am using v5.1.0 Also tried removing node_moduels folder too but no luck. Steps I followed

    • npm install
    • npm install angular cli
    • npm install yarn
    • npm start

    Thank you!

  • User Avatar
    0
    alirizaadiyahsi created

    Hi @vrpatlola we suggest to use yarn instead of npm install. Check this: <a class="postlink" href="https://aspnetzero.com/Documents/Getting-Started-Angular#restore-packages">https://aspnetzero.com/Documents/Gettin ... e-packages</a>

    Could you try following 3 steps?

    • remove node_modules
    • run yarn command
    • run npm start command
  • User Avatar
    0
    talehoang created

    <cite>vrpatlola: </cite>

    <cite>alirizaadiyahsi: </cite> Hi @vrpatlola, what is your project version? Could you remove node_modules folder, then run yarn command before npm start command?

    I am using v5.1.0 Also tried removing node_moduels folder too but no luck. Steps I followed

    • npm install
    • npm install angular cli
    • npm install yarn
    • npm start

    Thank you!

    I did but i'm not lucky, it's still problem. I'm using v 5.2.0 on CentOS 7

  • User Avatar
    0
    alper created
    Support Team

    if you still couldn't delete node_modules, exit Visual Studio or any other apps that might lock that folder. install rimraf and try to delete that folder with rimraf. <a class="postlink" href="https://github.com/isaacs/rimraf">https://github.com/isaacs/rimraf</a>