为了账号安全,请及时绑定邮箱和手机立即绑定

webpack hello.js hello.bundle.js 报错


$ webpack hello.js hello.bundle.js

C:\Users\yu\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:244

                                throw err;

                                ^


TypeError: Cannot read property 'length' of undefined

    at processConfiguredOptions (C:\Users\yu\AppData\Roaming\npm\node_modules\webpack-cli\bin\convert-argv.js:160:44)

    at module.exports (C:\Users\yu\AppData\Roaming\npm\node_modules\webpack-cli\bin\convert-argv.js:148:10)

    at yargs.parse (C:\Users\yu\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:241:39)

    at Object.parse (C:\Users\yu\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\_yargs@11.1.0@yargs\yargs.js:552:18)

    at C:\Users\yu\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:219:8

    at Object.<anonymous> (C:\Users\yu\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:530:3)

    at Module._compile (internal/modules/cjs/loader.js:778:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

    at Module.load (internal/modules/cjs/loader.js:653:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

    at Module.require (internal/modules/cjs/loader.js:692:17)

    at require (internal/modules/cjs/helpers.js:25:18)

    at runCli (C:\Users\yu\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:54:2)

    at Object.<anonymous> (C:\Users\yu\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:147:2)

    at Module._compile (internal/modules/cjs/loader.js:778:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

    at Module.load (internal/modules/cjs/loader.js:653:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)

    at startup (internal/bootstrap/node.js:283:19)

    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)


正在回答

3 回答

 webpack ./hello.js --output-path ./ --output-filename bundle.js --mode development

搜索

复制

0 回复 有任何疑惑可以回复我~
#1

weixin_慕斯1009030

这个是5.64.1版本的命令
2021-11-16 回复 有任何疑惑可以回复我~
#2

qq_甲骨文_3

你好,能否请教一下Error: Unknown option '--module-bind'这个如果要转换成新语法的方法,我搜索了半天都没找到
2022-01-17 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

webpack hello.js hello.bundle.js 报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信