Immutable solution version
Stencil Bundle fails with error Cannot read properties of undefined (reading 'has')
Complete solution
Shows how to fix stencil Bundle fails with error Cannot read properties of undefined (reading 'has'). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Check your version of BigCommerce first , maintainers often fix the underlying bug in a later release, and the thread may predate it.
Steps
- Issue bigcommerce/cornerstone#2428 (closed, 10 comments): Attempting to run stencil bundle after ok --- Template Parsing Finished The command generates a list of errors:
isModuleDeclarationhas been deprecated, please migrate toisImportOrExportDeclarationat isModuleDeclaration ([HOME]/... Business Dropbox/Marketing/[OFFICIAL ARCHIVE]/ALDERACSTORE.COM STENCIL FILES/git.cornerstone/nodemodules/@babel/types/lib/validators/generated/index.js:2748:35) at PluginPass.Program ([HOME]/... Business Dropbox/Marketing/[OFFICIAL ARCHIVE]/ALDERACSTORE.COM STENCIL FILES/git.cornerstone/nodemodules/babel-plugin-lodash/lib/index. - This comes from one real issue thread (https://github.com/bigcommerce/cornerstone/issues/2428); it is the verified fix or approach from that thread, not a general manual. Check your version of BigCommerce first , maintainers often fix the underlying bug in a later release, and the thread may predate it.
When to use
You are seeing this: Business Dropbox/Marketing/[OFFICIAL ARCHIVE]/ALDERACSTORE.COM STENCIL FILES/git.cornerstone/node_modules/@babel/types/lib/validators/generated/index.js:2748:35) at PluginPass.Program ([HOME]/... Use this skill when you run into "Stencil Bundle fails with error Cannot read properties of undefined (reading 'has')".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
Issue bigcommerce/cornerstone#2428 (closed, 10 comments): Attempting to run stencil bundle after ok --- Template Parsing Finished The command generates a list of errors: isModuleDeclaration has been deprecated, please migrate to isImportOrExportDeclaration at isModuleDeclaration ([HOME]/...
Sources
- https://github.com/bigcommerce/cornerstone/issues/2428
Evidence
Issue gh:bigcommerce/cornerstone#2428 asked: Issue bigcommerce/cornerstone#2428 (closed, 10 comments): Attempting to run stencil bundle after ok --- Template Parsing Finished The command generates a list of errors: isModuleDeclaration has been deprecated, please migrate to isImportOrExportDeclaration at isModuleDeclaration ([HOME]/... Business Dropbox/Marketing/[OFFICIAL ARCHIVE]/ALDERACSTORE.COM STENCIL FILES/git.cornerstone/nodemodules/@babel/types/lib/validators/generated/index.js:2748:35) at PluginPass.Program ([HOME]/... Business Dropbox/Marketing/[OFFICIAL ARCHIVE]/ALDERACSTORE.COM STENCIL FILES/git.cornerstone/nodemodules/babel-plugin-lodash/lib/index. The verified answer from the thread: If stencil bundle fails with 'Cannot read properties of undefined', check where your project lives. The reporter had theirs in Dropbox and the bundle succeeded after moving it to local storage. Cloud-synced folders can break the bundler. The Babel warnings in the output are nonfatal, ignore those. Source: https://github.com/bigcommerce/cornerstone/issues/2428
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_fie6huC87WZKdc9WDOCCng" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Stencil Bundle fails with error Cannot read properties of undefined (reading 'has') <span>— Vectle</span></a>