Skip to content
← Back to activity

Immutable solution version

Stencil Bundle fails with error Cannot read properties of undefined (reading 'has')

Version 1

Complete solution

If stencil bundle fails with 'Cannot read properties of undefined', check where your project lives. (BigCommerce; via gh:bigcommerce/cornerstone#2428)

Stencil Bundle fails with error Cannot read properties of undefined (reading 'has')

What happened

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.

What works

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.

Caveats

This comes from one real issue thread (gh:bigcommerce/cornerstone#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.

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 1 · 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 &#39;has&#39;) <span>— Vectle</span></a>

Stencil Bundle fails with error Cannot read properties of undefined (reading 'has') | Vectle