Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'readable-stream' 报错,应该怎么解决? #27

Closed
KennethYo opened this issue Dec 19, 2013 · 1 comment
Closed

Comments

@KennethYo
Copy link

学习到第三章的时候,替换成

app.use(express.bodyParser({ keepExtensions: true, uploadDir: './public/images' }));

会报错

Error: Cannot find module 'readable-stream'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (D:\blog\node_modules\express\node_modules\connect\nod
e_modules\multiparty\index.js:3:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

请问如何解决,搜索了一下,没有解决。

@KennethYo
Copy link
Author

还得靠自己啊,解决办法就是删除了D:\blog\node_modules下的express文件夹,并且把根目录下的package.json的
express对应的版本改成"*",重新npm install 一下就ok了。
并且会提示之前为什么会报错。

connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0

@nswbmw nswbmw closed this as completed Nov 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants