【问题标题】:I get these errors when I use the ```npm run dev``` command当我使用 ```npm run dev``` 命令时出现这些错误
【发布时间】:2021-11-14 13:02:17
【问题描述】:
Error: Cannot find module 'This is the Folder path \bin\webpack.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47* {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `webpack serve --config ./bundler/webpack.dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\21697\AppData\Roaming\npm-cache\_logs\2021-09-20T20_54_58_070Z-debug.log
PS C:This is the Folder path> 

PS:我确实删除了 package-lock 和 node_modules 并使用 npm install 重新安装了 npm 但是问题依然存在,我也试过重新安装node js,同样的事情

【问题讨论】:

    标签: node.js npm webpack


    【解决方案1】:

    我终于通过重新安装node js & npm 并使用命令npm i chokidar@3.0.0 安装chokidar 3 来解决它原来之前的版本不支持node js 14+

    【讨论】:

      【解决方案2】:

      Error: Cannot find module 'This is the Folder path \bin\webpack.js'

      它正在寻找一个名称/路径为'This is the Folder path \bin\webpack.js' 的模块。这看起来不像是有效的模块名称/路径。

      看起来你在不应该有的地方添加了一些调试文本。

      由于您没有发布任何代码,因此很难提出其他解释。

      【讨论】:

        猜你喜欢
        • 2019-02-22
        • 2018-03-25
        • 2017-12-28
        • 1970-01-01
        • 1970-01-01
        • 2020-01-09
        • 2020-11-25
        • 1970-01-01
        • 2021-04-19
        相关资源
        最近更新 更多