Hi there,
I’ve just stumbled upon a continuous deployment error due to a number in webpack’s configuration file. The log from the error is as follows:
7:07:19 PM: /opt/build/repo/webpack.config.js:61
7:07:19 PM: maxEntrypointSize: 300_000,
7:07:19 PM: ^^^
7:07:19 PM: SyntaxError: Invalid or unexpected token
7:07:19 PM: at new Script (vm.js:83:7)
7:07:19 PM: at NativeCompileCache._moduleCompile (/opt/build/repo/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
7:07:19 PM: at Module._compile (/opt/build/repo/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
7:07:19 PM: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
7:07:19 PM: at Module.load (internal/modules/cjs/loader.js:653:32)
7:07:19 PM: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
7:07:19 PM: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
7:07:19 PM: at Module.require (internal/modules/cjs/loader.js:692:17)
7:07:19 PM: at require (/opt/build/repo/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
7:07:19 PM: at WEBPACK_OPTIONS (/opt/build/repo/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
7:07:19 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
7:07:19 PM: at requireConfig (/opt/build/repo/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
7:07:19 PM: at /opt/build/repo/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
7:07:19 PM: at Array.forEach (<anonymous>)
7:07:19 PM: at module.exports (/opt/build/repo/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
7:07:19 PM: Shutting down logging, 38 messages pending
However, if I manually deploy the site, it works.
Any idea about why it happens?
Thanks in advance.