Cannot read property 'has' of undefined
Expected behavior
stencil push
Actual behavior
Multiple "Cannot read property 'has' of undefined" errors e.g.
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\common\collapsible.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:22:24)
Stencil-cli version stencil --version:
3.5.2
Node version node -v:
12.0.0
NPM version npm -v:
3.5.2
OS: Windows 10 And also Linux (WSL)
Tried new stencil init and also deleting node_modules and reinstalling npm i No luck
stencil push
Validating theme...
SCSS Parsing Started...
Template Parsing Started...
Language Files Parsing Started...
Building Theme Schema File...
Schema Translations Parsing Started...
Theme task Started...
ok -- Language Files Parsing Finished
ok -- Schema Translations Parsing Finished
ok -- Theme Schema Building Finished
ok -- SCSS Parsing Finished
ok -- Template Parsing Finished
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.0.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.1.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.10.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.11.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.12.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.13.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.14.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.2.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.3.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.6.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.7.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.8.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.chunk.9.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.head_async.js": no such file
Error parsing bundle asset "C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\theme-bundle.main.js": no such file
No bundles were parsed. Analyzer will show only original module sizes from stats file.
Webpack Bundle Analyzer saved report to C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\dist\report.html
ERROR in ./assets/js/theme/account.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\account.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/cart.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\cart.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/common/collapsible.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\common\collapsible.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/common/faceted-search.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\common\faceted-search.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/common/form-utils.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\common\form-utils.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/common/nod-functions/min-max-validate.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\common\nod-functions\min-max-validate.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/common/product-details.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\common\product-details.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/common/state-country.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\common\state-country.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/global/compare-products.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\global\compare-products.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/global/mobile-menu-toggle.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\global\mobile-menu-toggle.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
ERROR in ./assets/js/theme/global/quick-search.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\global\quick-search.js: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
at memoized (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\memoize.js:62:23)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:217:63
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:193:30
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:181:28
at arrayEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\_arrayEach.js:15:9)
at forEach (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\lodash\forEach.js:38:10)
at PluginPass.Program (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\index.js:170:26)
at newFn (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\visitors.js:171:21)
at NodePath._call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\@babel\traverse\lib\path\context.js:40:17)
failed -- worker terminated
not ok -- Error: worker terminated
Please visit the troubleshooting page https://developer.bigcommerce.com/stencil-docs/deploying-a-theme/troubleshooting-theme-uploads.
If this error persists, please visit https://github.com/bigcommerce/stencil-cli/issues and submit an issue.
Does stencil start work?
looks like you have an error in account.js
ERROR in ./assets/js/theme/account.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\assets\js\theme\account.js: Cannot read property 'has' of undefined
stencil start produces the same errors as stencil push. All the errors point to the same node_module as the error
ERROR in ....
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: ....: Cannot read property 'has' of undefined
at resolvePath (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:25:24)
at importModule (C:\dev\bigcommerce\GoCpap+(07-27-2021)-1\node_modules\babel-plugin-lodash\lib\importModule.js:39:53)
Is your theme forked from cornerstone? Did this work prior to 3.5.x?
Tree shaking in loash may remove has() see:
https://github.com/bigcommerce/cornerstone/blob/master/webpack.common.js#L63
repo for lodash-webpack-plugin: https://github.com/lodash/lodash-webpack-plugin
that is your issue... from the readme:
The following features are removed by default (biggest savings first):
paths : Deep property path support for methods like _.get, _.has, & _.set.
I inherited a project so I do not know much about it's history. But before updating Stencil I was able to run the project locally. Thanks! I modified the webpack.common.js with the following lodash options and now am able to run locally again.
plugins: [
'@babel/plugin-syntax-dynamic-import', // add support for dynamic imports (used in app.js)
// 'lodash', // Tree-shake lodash
'lodash', { options: { paths: true } }
],