这几天接触了下node.js,在启动的时候遇到了点小问题
I.问题描述
II.解决方法
使用基于node.js的express框架启动报错:Error: Cannot find module 'express-session',这是因为缺少模块的引用。
比如我使用了'express-session',却没有在 package.json 文件的 "dependencies" 项中添加 'express-session' 的依赖便会报错。
如果你在 package.json 文件中添加依赖的话,就需要在你的目录(我的目录是:D:\Easion\nodejs\myapp)下执行:npm install
我使用的方法是执行:npm install 模块名称 --save
如果以后还遇到这类问题记得把我这提到的'xxx'或 'express-session' 替换为你缺少的依赖名称就行了哦~
Comments | 15 条评论
Helpful information. Lucky me I found your site accidentally, and I’m stunned why this twist of fate didn’t happened in advance! I bookmarked it. Constantia Jaime Novelia
Very informative blog article. Thanks Again. Fantastic. Carmel Tucker Cheyney
What a data of un-ambiguity and preserveness of precious familiarity about unpredicted feelings. Tiff Gerome Hulbard
There is definately a great deal to learn about this topic. I like all the points you made. Gerrie Cyrillus Reave
This is something that will need all of our combined efforts to address. Teena Swen Royo
I believe you have mentioned some very interesting points, appreciate it for the post. Agnola Micheil Castorina
As I site possessor I believe the content matter here is rattling excellent , appreciate it for your efforts. Maggee Adamo Hullda
I am truly happy to read this webpage posts which includes lots of useful data, thanks for providing such data. Nelle Adolph Noni
Just arrived to your blog from Google. Thanks for this information and analysis that really touched me. Tiffi Diarmid Urson
My relatives always say that I am wasting my time here at web, however I know I am getting know-how all the time by reading thes pleasant articles. Arleen Ford Montagna
Appreciation to my father who told me on the topic of this web site, this weblog is actually remarkable. Jacky Tadeas Muriel
My brother suggested I may like this blog. He was once totally right. Frankie Tobie Lyndy
Safety therefore demands that Lexapro be presumed to cause the same withdrawal symptoms as other SSRI drugs. Daria Dick Biddick
Excellent, what a web site it is! This website gives valuable data to us, keep it up. Denni Shaun Kohler
I am regular reader, how are you everybody? This post posted at this web site is in fact pleasant. Janelle Aksel Booma