internal/modules/cjs/loader.js:582 throw err

前端 未结 25 1829
有刺的猬
有刺的猬 2020-11-27 04:24

I\'m getting following Console Error. Error : Cannot find module

Here is the full error i\'m getting in console. What should I do?



        
相关标签:
25条回答
  • 2020-11-27 05:25

    same happen to me i just resolved by deleting "dist" file and re run the app.

    0 讨论(0)
  • 2020-11-27 05:25

    Something weird happened to me last night. I ran command node run watch instead of npm run watch. I tried doing everything on this thread but nothing worked out for me. I was frustrated but eventually noticed that I ran the command wrong. I was laughing out loud. Sometimes this things happened. Enjoying learning Nodejs though.

    0 讨论(0)
  • 2020-11-27 05:26

    Replace your file name in package.json ({"npm": <your server code file name>.js}) with that file where your server code is running (it should be app.js, main.js, start.js, server.js, or whatever you picked up).

    0 讨论(0)
  • 2020-11-27 05:26

    For me "npm install" again from command prompt worked. Command Prompt must be "Run as Administrator"

    0 讨论(0)
  • you need start server use follow command

    npm start
    

    or

    yarn start
    
    0 讨论(0)
  • 2020-11-27 05:29

    I was having the same error because I had a space at the end of my filename(not the reference but the actual filename). Once I changed 'app.js ' to 'app.js' it worked fine.

    0 讨论(0)
提交回复
热议问题