webstorm7创建express出错,何解?
发布于 10 年前 作者 ddzjs 9089 次浏览 最后一次编辑是 8 年前

弹出错误提示: Error creating Node.js Express App. Wrong express generator: F:\workspace\demo\node_modules\express\bin\express

9 回复

貌似是版本问题,4.x和3.x区别很大。手动生成,然后用WebStrom编辑。 The quickest way to get started with express is to utilize the executable express(1) to generate an application as shown below: Install the executable. The executable’s major version will match Express’s: $ npm install -g express-generator@3 Create the app: $ express /tmp/foo && cd /tmp/foo Install dependencies: $ npm install Start the server: $ npm start

好的,我试试先

我能通过手动创建express项目,也能通过命令行启动它,浏览器可以访问

但是通过webstorm就无法创建express项目了,版本为4.1.1

我就纳闷了,我新创建的项目,又不是老项目,怎么和版本有冲突了

webstorm 7 对node 0.11.x版本不兼容,换成WS6或node0.10.x版本或许就可以了

是的,版本问题

都8.03了 升级吧 支持0.11.x ES6语法

买不起啊

回到顶部