2019-07-04

作者: 逆流而上_8413 | 来源:发表于2019-07-04 15:09 被阅读0次

    windows电脑上执行npm run build报错(node --max_old_space_size=9000 ./node_modules/.bin/webpack --config webpack.config.prod.js)报错信息如下:

                basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

              ^^^^^^^

        SyntaxError: missing ) after argument list

        at Module._compile (internal/modules/cjs/loader.js:721:23)

        at Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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:829:12)

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

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

    解决方法  将"./node_modules/.bin/webpack"改为"./node_modules/webpack/bin/webpack"即可

    相关文章

      网友评论

        本文标题:2019-07-04

        本文链接:https://www.haomeiwen.com/subject/cxcrhctx.html