Error: Cannot find module 'ejs'

后端 未结 29 2039
南方客
南方客 2020-12-13 05:33

Here is my complete error:

Error: Cannot find module \'ejs\'
    at Function._resolveFilename (module.js:317:11)
    at Function._load (module.js:262:25)
            


        
29条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 06:03

    I had this exact same problem a couple of days ago and couldn't figure it out. Haven't managed to fix the problem properly but this works as a temporary fix:

    Go up one level (above app.js) and do npm install ejs. It will create a new node_modules folder and Express should find the module then.

提交回复
热议问题