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

前端 未结 25 2001
有刺的猬
有刺的猬 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:02

    The path to the js file you're trying to execute is wrong; you have to type the path and the file name you want to execute relative to root where node is, but what you typed isn't where it is.

    I typed node redux-basics.js, got this slightly-misleading error message, Stack Overflow'ed, looked at my file system, and I should have typed node src/redux-basics.js.

提交回复
热议问题