我无法使用Eclipse Luna中的各种讨论板和教程视频中显示的完整项目结构创建NodeJS + Express项目。
以下是我的系统,Node和Nodeclipse配置的详细信息。
npm config ls -l的结果如下,
; cli configs
long = true
user-agent = "npm/3.9.5 node/v6.2.2 win32 x64"
; userconfig C:\Users\SomeName\.npmrc
prefix = "D:\\ProgramFiles\\nodejs\\node_modules\\npm"
; builtin config undefined
; prefix = "C:\\Users\\SomeName\\AppData\\Roaming\\npm" (overridden)
; default values
access = null
also = null
always-auth = false
bin-links = true
browser = null
ca = null
cache = "C:\\Users\\SomeName\\AppData\\Roaming\\npm-cache"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
color = true
depth = null
description = true
dev = false
dry-run = false
editor = "notepad.exe"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "D:\\ProgramFiles\\nodejs\\node_modules\\npm\\etc\\npmrc"
globalignorefile = "D:\\ProgramFiles\\nodejs\\node_modules\\npm\\etc\\npmignore"
group = 0
heading = "npm"
https-proxy = null
if-present = false
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "C:\\Users\\SomeName\\.npm-init.js"
init-version = "1.0.0"
json = false
key = null
legacy-bundling = false
link = false
local-address = undefined
loglevel = "warn"
; long = false (overridden)
maxsockets = 50
message = "%s"
node-version = "6.2.2"
npat = false
onload-script = null
only = null
optional = true
parseable = false
; prefix = "D:\\ProgramFiles\\nodejs" (overridden)
production = false
progress = true
proprietary-attribs = true
proxy = null
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
rollback = true
save = false
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-prefix = "^"
scope = ""
searchexclude = null
searchopts = ""
searchsort = "name"
shell = "C:\\WINDOWS\\system32\\cmd.exe"
shrinkwrap = true
sign-git-tag = false
strict-ssl = true
tag = "latest"
tag-version-prefix = "v"
tmp = "C:\\Users\\SOME~1.NAM\\AppData\\Local\\Temp"
umask = 0
unicode = false
unsafe-perm = true
usage = false
user = 0
; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch}" (overridden)
userconfig = "C:\\Users\\SomeName\\.npmrc"
version = false
versions = false
viewer = "browser"
以下是我在NodeJS透视图中创建NodeJS Express项目时收到的例外情况,
java.lang.reflect.InvocationTargetException
at org.nodeclipse.ui.util.ProcessUtils.exec(ProcessUtils.java:202)
at org.nodeclipse.ui.wizards.ExpressProjectWizard.generateExpressApplication(ExpressProjectWizard.java:231)
at org.nodeclipse.ui.wizards.ExpressProjectWizard.access$1(ExpressProjectWizard.java:199)
at org.nodeclipse.ui.wizards.ExpressProjectWizard$2.run(ExpressProjectWizard.java:122)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.io.IOException: Cannot run program "" (in directory "C:\Users\SOME~1.NAM\AppData\Local\Temp\express-work\1468060211358"): CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(Unknown Source)
at org.nodeclipse.ui.util.ProcessUtils.exec(ProcessUtils.java:184)
... 4 more
Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 6 more
Root exception:
java.io.IOException: Cannot run program "" (in directory "C:\Users\SOME~1.NAM\AppData\Local\Temp\express-work\1468060211358"): CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(Unknown Source)
at org.nodeclipse.ui.util.ProcessUtils.exec(ProcessUtils.java:184)
at org.nodeclipse.ui.wizards.ExpressProjectWizard.generateExpressApplication(ExpressProjectWizard.java:231)
at org.nodeclipse.ui.wizards.ExpressProjectWizard.access$1(ExpressProjectWizard.java:199)
at org.nodeclipse.ui.wizards.ExpressProjectWizard$2.run(ExpressProjectWizard.java:122)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 6 more