使用 Intellij Idea 创建 Node.js Express App 时出错

使用 Intellij Idea 创建 Node.js Express App 时出错

我是 Ubuntu 新手。我正在尝试在 ubuntu 上使用 intellij 创建一个带有 express 项目的示例 node js。

我已经安装了 node、nodejs、npm、express,当我使用 intellij 创建一个项目类型为 node 的新项目时。在创建项目文件之前,我收到以下错误消息。

Error creating Node.js Express App. Failed command:
/usr/bin/npm install
Exit code: 56
Standard error:
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/morgan
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/serve-favicon
npm http GET https://registry.npmjs.org/jade
npm http GET https://registry.npmjs.org/body-parser
npm http GET https://registry.npmjs.org/cookie-parser
npm http 304 https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/jade
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/serve-favicon
npm http 304 https://registry.npmjs.org/morgan
npm http 304 https://registry.npmjs.org/body-parser
npm http 304 https://registry.npmjs.org/cookie-parser
npm http GET https://registry.npmjs.org/etag
npm http GET https://registry.npmjs.org/fresh/0.3.0
npm http GET https://registry.npmjs.org/ms/0.7.1
npm http GET https://registry.npmjs.org/parseurl
npm http GET https://registry.npmjs.org/cookie/0.1.3
npm http GET https://registry.npmjs.org/cookie-signature/1.0.6
npm http GET https://registry.npmjs.org/on-finished
npm http GET https://registry.npmjs.org/on-headers
npm http GET https://registry.npmjs.org/basic-auth
npm http GET https://registry.npmjs.org/depd
npm http 304 https://registry.npmjs.org/etag
npm http 304 https://registry.npmjs.org/parseurl
npm http 304 https://registry.npmjs.org/on-finished
npm http GET https://registry.npmjs.org/bytes/2.1.0
npm http GET https://registry.npmjs.org/content-type
npm http GET https://registry.npmjs.org/http-errors
npm http GET https://registry.npmjs.org/iconv-lite/0.4.11
npm http GET https://registry.npmjs.org/qs/4.0.0
npm http GET https://registry.npmjs.org/raw-body
npm http GET https://registry.npmjs.org/type-is
npm http 304 https://registry.npmjs.org/cookie/0.1.3
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.6
npm http 304 https://registry.npmjs.org/basic-auth
npm http 304 https://registry.npmjs.org/ms/0.7.1
npm http 304 https://registry.npmjs.org/fresh/0.3.0
npm http 304 https://registry.npmjs.org/http-errors
npm http 304 https://registry.npmjs.org/on-headers
npm http 304 https://registry.npmjs.org/bytes/2.1.0
npm http 304 https://registry.npmjs.org/depd
npm http 304 https://registry.npmjs.org/iconv-lite/0.4.11
npm http 304 https://registry.npmjs.org/raw-body
npm http 304 https://registry.npmjs.org/qs/4.0.0
npm http 304 https://registry.npmjs.org/type-is
npm http GET https://registry.npmjs.org/path-to-regexp/0.1.7
npm http GET https://registry.npmjs.org/proxy-addr
npm http GET https://registry.npmjs.org/range-parser
npm http GET https://registry.npmjs.org/send/0.13.0
npm http GET https://registry.npmjs.org/serve-static
npm http GET https://registry.npmjs.org/utils-merge/1.0.0
npm http GET https://registry.npmjs.org/vary
npm http GET https://registry.npmjs.org/accepts
npm http GET https://registry.npmjs.org/array-flatten/1.1.1
npm http GET https://registry.npmjs.org/content-disposition/0.5.0
npm http GET https://registry.npmjs.org/escape-html/1.0.2
npm http GET https://registry.npmjs.org/finalhandler/0.4.0
npm http GET https://registry.npmjs.org/merge-descriptors/1.0.0
npm http GET https://registry.npmjs.org/methods
npm http 304 https://registry.npmjs.org/content-type
npm http 304 https://registry.npmjs.org/serve-static
npm http 304 https://registry.npmjs.org/range-parser
npm http 304 https://registry.npmjs.org/vary
npm http 304 https://registry.npmjs.org/send/0.13.0
npm http 304 https://registry.npmjs.org/accepts
npm http 304 https://registry.npmjs.org/utils-merge/1.0.0
npm http 304 https://registry.npmjs.org/array-flatten/1.1.1
npm http 304 https://registry.npmjs.org/content-disposition/0.5.0
npm http 304 https://registry.npmjs.org/escape-html/1.0.2
npm http 304 https://registry.npmjs.org/path-to-regexp/0.1.7
npm http 304 https://registry.npmjs.org/proxy-addr
npm http 304 https://registry.npmjs.org/methods
npm http 304 https://registry.npmjs.org/merge-descriptors/1.0.0
npm http 304 https://registry.npmjs.org/finalhandler/0.4.0
npm http GET https://registry.npmjs.org/ee-first/1.1.1
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/statuses
npm http GET https://registry.npmjs.org/media-typer/0.3.0
npm http GET https://registry.npmjs.org/mime-types
npm http 304 https://registry.npmjs.org/ee-first/1.1.1
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/unpipe/1.0.0
npm http 304 https://registry.npmjs.org/statuses
npm http 304 https://registry.npmjs.org/mime-types
npm http 304 https://registry.npmjs.org/media-typer/0.3.0
npm http 304 https://registry.npmjs.org/unpipe/1.0.0
npm http GET https://registry.npmjs.org/unpipe
npm http GET https://registry.npmjs.org/forwarded
npm http GET https://registry.npmjs.org/ipaddr.js/1.0.1
npm http GET https://registry.npmjs.org/negotiator/0.5.3
npm http 304 https://registry.npmjs.org/unpipe
npm http 304 https://registry.npmjs.org/forwarded
npm http GET https://registry.npmjs.org/destroy/1.0.3
npm http GET https://registry.npmjs.org/mime/1.3.4
npm http 304 https://registry.npmjs.org/ipaddr.js/1.0.1
npm http GET https://registry.npmjs.org/mime-db
npm http 304 https://registry.npmjs.org/mime/1.3.4
npm http 304 https://registry.npmjs.org/destroy/1.0.3
npm http 304 https://registry.npmjs.org/negotiator/0.5.3
npm http 304 https://registry.npmjs.org/mime-db
npm http GET https://registry.npmjs.org/jstransformer/0.0.2
npm http GET https://registry.npmjs.org/character-parser/1.2.1
npm http GET https://registry.npmjs.org/clean-css
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/transformers/2.1.0
npm http GET https://registry.npmjs.org/constantinople
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/void-elements
npm http GET https://registry.npmjs.org/with
npm http 304 https://registry.npmjs.org/clean-css
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/constantinople
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/void-elements
npm http 304 https://registry.npmjs.org/character-parser/1.2.1
npm http 304 https://registry.npmjs.org/with
npm ERR! Error: EROFS, symlink '../mime/cli.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.19.0-25-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /media/sf_SVN_HOME_2/YASSER/temp/untitled
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path ../mime/cli.js
npm ERR! code EROFS
npm ERR! errno 56
npm http 304 https://registry.npmjs.org/jstransformer/0.0.2
npm http 304 https://registry.npmjs.org/transformers/2.1.0
npm http GET https://registry.npmjs.org/acorn
npm http GET https://registry.npmjs.org/acorn-globals
npm http GET https://registry.npmjs.org/is-promise
npm http GET https://registry.npmjs.org/promise
npm http GET https://registry.npmjs.org/acorn
npm http 304 https://registry.npmjs.org/acorn
npm http 304 https://registry.npmjs.org/acorn-globals
npm http 304 https://registry.npmjs.org/is-promise
npm http 304 https://registry.npmjs.org/promise
npm http GET https://registry.npmjs.org/css
npm http 304 https://registry.npmjs.org/acorn
npm http 304 https://registry.npmjs.org/css
npm http GET https://registry.npmjs.org/minimist/0.0.8
npm http 304 https://registry.npmjs.org/minimist/0.0.8
npm http GET https://registry.npmjs.org/css-parse/1.0.4
npm http GET https://registry.npmjs.org/css-stringify/1.0.5
npm http GET https://registry.npmjs.org/asap
npm http 304 https://registry.npmjs.org/css-parse/1.0.4
npm http 304 https://registry.npmjs.org/css-stringify/1.0.5
npm http 304 https://registry.npmjs.org/asap
npm ERR! error rolling back Error: UNKNOWN, unlink '/media/sf_SVN_HOME_2/YASSER/temp/untitled/node_modules/jade/node_modules/uglify-js/lib/parse.js'
npm ERR! error rolling back  [email protected] { [Error: UNKNOWN, unlink '/media/sf_SVN_HOME_2/YASSER/temp/untitled/node_modules/jade/node_modules/uglify-js/lib/parse.js']
npm ERR! error rolling back   errno: -1,
npm ERR! error rolling back   code: 'UNKNOWN',
npm ERR! error rolling back   path: '/media/sf_SVN_HOME_2/YASSER/temp/untitled/node_modules/jade/node_modules/uglify-js/lib/parse.js' }
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /media/sf_SVN_HOME_2/YASSER/temp/untitled/npm-debug.log
npm ERR! not ok code 0

但可以看到所有相关文件和文件夹结构。

在此处输入图片描述

我应该担心这个吗?还是我应该忽略它,每次创建项目时我都会遇到这个问题。

任何想法 ?

编辑

我试过什么迈克尔斯建议 -http://expressjs.com/starter/generator.html。我认为由于某种原因,express 框架没有正确安装。这是我刚刚尝试的控制台转储。

yasser@yasser-VirtualBox:~$ sudo npm install express-generator -g
npm http GET https://registry.npmjs.org/express-generator
npm http 304 https://registry.npmjs.org/express-generator
npm http GET https://registry.npmjs.org/commander/2.7.1
npm http GET https://registry.npmjs.org/mkdirp/0.5.1
npm http GET https://registry.npmjs.org/sorted-object/1.0.0
npm http 304 https://registry.npmjs.org/sorted-object/1.0.0
npm http 304 https://registry.npmjs.org/commander/2.7.1
npm http 304 https://registry.npmjs.org/mkdirp/0.5.1
npm http GET https://registry.npmjs.org/graceful-readlink
npm http GET https://registry.npmjs.org/minimist/0.0.8
npm http 304 https://registry.npmjs.org/graceful-readlink
npm http 304 https://registry.npmjs.org/minimist/0.0.8
/usr/local/bin/express -> /usr/local/lib/node_modules/express-generator/bin/express
[email protected] /usr/local/lib/node_modules/express-generator
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected])
yasser@yasser-VirtualBox:~$ express -h
yasser@yasser-VirtualBox:~$ express myapp
yasser@yasser-VirtualBox:~$ 

相关内容