修补repl-plus
软件包源以使其在Linux上运行后,我遇到了这个问题:
$ repl-plus
module.js:327
throw err;
^
Error: Cannot find module 'q'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/bin/repl-plus:9:9)
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 Function.Module.runMain (module.js:441:10)
但是,如果我查询npm
已安装的软件包,我会得到:
$ npm ls -g | grep q@
| +-- lodash._baseuniq@4.6.0
| +-- lodash.uniq@4.5.0
+-- q@1.5.1
| `-- q@1.5.1
汇总难以理解的错误消息和npm相关代码的一般低质量......我在哪里开始尝试解决此问题?