I'm building my app by running npm run build
and it errors out
with this output:
/home/markalexa/blog/client/node_modules/react-dev-utils/node_modules/globby/index.js:47
...taskOptions,
^^^
SyntaxError: Unexpected token ...
it points to this code block in index.js
within the node_modules
directory:
const generateGlobTasks = (patterns, taskOptions) => {
patterns = arrayUnion([].concat(patterns));
assertPatternsInput(patterns);
checkCwdOption(taskOptions);
const globTasks = [];
taskOptions = {
...taskOptions, // <--
ignore: [],
expandDirectories: true
};
The build has problem with the spread operator for some reason. Can you give me
any pointers to how to fix this ? I'm not really a npm developer.
node version: 6.11.4
npm version: 6.14.11
Thank you.
Edit:
After updating node to 8.6 which bumped up version of V8 as well
I'm getting this after running npm run build
:
/home/markalexa/blog/client/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
} catch {
^
SyntaxError: Unexpected token {
question from:
https://stackoverflow.com/questions/65901034/npm-run-build-fails-with-error-originated-from-the-build-code 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…