Express在Ubuntu上不起作用 [英] Express doesn't work on ubuntu

查看:153
本文介绍了Express在Ubuntu上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚用nodejs尝试学习它。我已经通过命令安装了node framework express作为全局模块:

  $ sudo npm install express -g 

这个工作正常,我在 / usr / lib / node_modules 中有它。然后,我正在快速创建一个新项目:

  $ express app 
/ pre>

但是这不会创建项目文件夹,不返回任何错误代码,清除节点代码工作正常。任何人都知道如何检测并修复此错误?

解决方案

首先要做的是如果安装了插件:



$ npm -g ls | grep express



如果没有返回,请尝试重新安装。



这种情况仍然是安装的,下一个解决方案是完全重新安装Node。



有一个很好的清理节点安装在这里:使用Linux命令行卸载Node.JS?


I'm new with nodejs and trying to learn it. I have installed node framework express as global module by command:

$ sudo npm install express -g

This works correctly and I have it in /usr/lib/node_modules. Then I'm creating a new project on express:

 $ express app

But this doesn't create project folder and does not return any error code, clear node code works fine. Anybody knows how to detect and fix this error?

解决方案

First thing to try is if the plugin is installed:

$ npm -g ls | grep express

If nothing is returned, try reinstalling it.

Since in this case it was still installed, the next solution was to reinstall Node entirely.

There is a great post on cleaning up Node installations here: Uninstall Node.JS using Linux command line?

这篇关于Express在Ubuntu上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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