如何修复“错误:无法在Node JS上找到模块'/ lib / index'

时间:2019-01-14 19:41:10

标签: javascript node.js express

我向项目(express-fileupload)添加了1个新库,但是,当运行节点服务器返回此消息时,我尝试使用以下命令:

  • npm安装
  • npm加载器
  • npm install winston(这是Github项目中报告的问题)
  • npm开始

但这不起作用。

$ node server.js
internal/modules/cjs/loader.js:605
    throw err;
    ^

Error: Cannot find module '/lib/index'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\david\Documents\INTRANET\dusoft-server\server.js:15:18)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)

0 个答案:

没有答案