我观察到在Eclipse中执行示例Node.js应用程序(使用Nodeclipse插件)会导致以下错误。
path.js:8
throw new TypeError('Path must be a string. Received ' +
^TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.posix.join (path.js:479:5)
at getPortsFile (/Users/Manglu/git/weather-company-data-demo/node_modules/ports/index.js:62:15)
at Object.<anonymous> (/Users/Manglu/git/weather-company-data-demo/node_modules/ports/index.js:13:29)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
最初,我怀疑这是否是我最近执行的Node.js升级的结果。但是我将它缩小到Eclipse / Nodeclipse,因为应用程序在终端会话中执行时没有问题。