这是在windows环境中创建的,如何将其运行到ubuntu环境中 .
stayinc/server$ node index.js
util.js:538
ctor.prototype = Object.create(superCtor.prototype, {
^
TypeError: Cannot read property 'prototype' of undefined
at Object.exports.inherits (util.js:538:43)
at Object. (/media/subhasis/3C92D33592D2F27E/LocalProject/stayinc/server/node_modules/mongodb/lib/gridfs-stream/download.js:46:6)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (/media/subhasis/3C92D33592D2F27E/LocalProject/stayinc/server/node_modules/mongodb/lib/gridfs-stream/index.js:2:30)
at Module._compile (module.js:449:26)
2 回答
在运行“node index.js”之前是否运行了以下命令?
它必须是
node.js
过时版本的问题 .您可以通过输入来检查当前版本
我想它会输出类似
0.8
的东西,这很老了 .