找不到模块快递 - 在窗口 [英] can not find module express --on windows

查看:149
本文介绍了找不到模块快递 - 在窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在windows console上使用npm install -g express,但是当我尝试node app.js时,会显示出错误找不到模块表达式,我已经设置了环境变量NODE_PATH ,但没有任何事情发生,我需要你的帮助,谢谢!

解决方案

全球安装的模块不可用,没有完整的路径。您需要在项目目录或父母中安装 express 查看有关模块加载的文档


I use "npm install -g express" on windows console.but when I try to "node app.js", it shows me the error"can not find module express",I had set the environment variable"NODE_PATH",but nothing happen ,I need your help,Thank you!

解决方案

Globally installed modules aren't accessible without full path. You need to install express in your project directory or it parents. Check out documentation about module loading.

这篇关于找不到模块快递 - 在窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆