0
votes

When bundling a theme I've been working on stencil has been throwing an error that prevents it from completing the bundle. I'm really at a loss for what to do.

Here is the console log from the console log:

E:\stencil>stencil bundle Validating theme... Running ESLint...

E:\stencil\assets\js\theme\common\carousel.js 22:159 error Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag

E:\stencil\assets\js\theme\common\product-details.js 300:15 warning Function 'updateView' has a complexity of 13 complexity

✖ 2 problems (1 error, 1 warning)

C:\Users\Kyle\AppData\Roaming\npm\node_modules\@bigcommerce\stencil-cli\lib\stencil-bundle.js:255 throw err; ^ Error: Please fix the above Javascript errors. at runLintTask (C:\Users\Kyle\AppData\Roaming\npm\node_modules\@bigcommerce\stencil-cli\lib\bundle-validator.js:268:18) at C:\Users\Kyle\AppData\Roaming\npm\node_modules\@bigcommerce\stencil-cli\node_modules\async\lib\async.js:718:13 at Immediate.iterate [as _onImmediate] (C:\Users\Kyle\AppData\Roaming\npm\node_modules\@bigcommerce\stencil-cli\node_modules\async\lib\async.js:262:13) at processImmediate [as _immediateCallback] (timers.js:367:17)

E:\stencil>

1
Have you updated Stencil CLI recently?Alyss
That install of the CLI is probably 2-3 weeks old I think? I'm not sure how to update it. And I'm afraid to reinstall it because it seems like that will override the custom work I've done on the theme.EGSdesign

1 Answers

2
votes

Looks like ESLint doesn't like some of your JS. You can try making the rules in the .eslintrc file less strict, or even delete the file altogether as it is not necessary.

Once the file is removed try bundling again.

More info on eslint here.