nodeman寻找.meta文件

dbe*_*ers 2 node.js

我按照以下说明操作:https: //github.com/remy/nodemon

安装:

sudo npm install -g nodeman
Run Code Online (Sandbox Code Playgroud)

然后我跑:

nodeman app.js
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

Error: Cannot find module '/usr/local/lib/node_modules/nodeman/docs/app.js.meta'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.help (/usr/local/lib/node_modules/nodeman/lib/nodeman.js:172:12)
    at Object.<anonymous> (/usr/local/lib/node_modules/nodeman/bin/_nodeman:61:21)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
Run Code Online (Sandbox Code Playgroud)

我的app.js只包含这个:

var http = require('http');

http.createServer(function(request, response){
    response.writeHead({
        'Content-Type':'/text/plain'
    });

    response.end('hello world');

}).listen(3000);
Run Code Online (Sandbox Code Playgroud)

era*_*zap 16

这是因为它是nodemon而不是nodeman

  • 谢谢,这是一个愚蠢的错误.甚至没有注意到它.同样清楚为什么没有其他人有这个问题...... (2认同)