Node.js Error: Cannot find module ' Ejs ' solution _node.js

Source: Internet
Author: User
Tags require

Find problems

Recently colleagues asked a question, he used Node.js, found node.js error, errors show:

Error:cannot Find module ' Ejs ' at
  function.module._resolvefilename (module.js:325:15) at
  function.module._ Load (module.js:276:25) at
  Module.require (module.js:353:17) at
  require (internal/module.js:12:17)
  at New View (d:\webclient\webstormspace\day6shuoshuo\node_modules\express\lib\view.js:78:30) at
  Eventemitter.render (D:\webclient\webstormspace\day6shuoshuo\node_modules\express\lib\application.js:569:12) At
  Serverresponse.render (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\response.js : 961:7) at
  exports.showindex (d:\webclient\webstormspace\day6shuoshuo\routes\router.js:7:9)
  at Layer.handle [as Handle_request] (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\router\ Layer.js:95:5) at
  next (d:\WebClient\webstormSpace\day6shuoshuo\node_modules\express\lib\router\route.js : 131:13)

Later, by looking for data, it was found that the reason was: no Ejs modules were installed

Solution:

CMD into the project directory, install Ejs:npm install --save ejs

Summarize

The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.