ember-cli: Error on production build [Cannot read property '_walk' of null]
Hi all,
When building my project in production mode I’m getting Cannot read property '_walk' of null. This happens to a few of our projects and started happening a few days back.
Anyone else with this issue? Any ideas how to solve it?
Thanks
ENV Summary:
TIME: Fri Sep 28 2018 10:27:46 GMT-0400 (Eastern Daylight Time)
TITLE: ember
ARGV:
- /Users/z002fawe/.nvm/versions/node/v10.9.0/bin/node
- /Users/z002fawe/.nvm/versions/node/v10.9.0/bin/ember
- build
- --environment=production
EXEC_PATH: /Users/z002fawe/.nvm/versions/node/v10.9.0/bin/node
TMPDIR: /var/folders/5g/tl5x1p1d15bbrv8fg4r1xmcw0000gn/T
SHELL: /bin/bash
PATH:
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /Applications/Wireshark.app/Contents/MacOS
- /Applications/Postgres.app/Contents/Versions/10/bin/
- /anaconda3/bin
- /Users/z002fawe/.nvm/versions/node/v10.9.0/bin
PLATFORM: darwin x64
FREEMEM: 1813299200
TOTALMEM: 17179869184
UPTIME: 90110
LOADAVG: 3.5947265625,2.98388671875,2.85546875
CPUS:
- Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz - 2200
- Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz - 2200
- Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz - 2200
- Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz - 2200
- Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz - 2200
- Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz - 2200
- Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz - 2200
- Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz - 2200
ENDIANNESS: LE
VERSIONS:
- ares: 1.14.0
- cldr: 33.1
- http_parser: 2.8.0
- icu: 62.1
- modules: 64
- napi: 3
- nghttp2: 1.32.0
- node: 10.9.0
- openssl: 1.1.0i
- tz: 2018e
- unicode: 11.0
- uv: 1.22.0
- v8: 6.8.275.24-node.14
- zlib: 1.2.11
ERROR Summary:
- broccoliBuilderErrorStack: TypeError: Cannot read property '_walk' of null
at AST_Dot.eval (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1145:29)
at TreeWalker._visit (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1546:21)
at AST_Dot._walk (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1144:24)
at AST_VarDef.eval (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1091:40)
at TreeWalker._visit (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1546:21)
at AST_VarDef._walk (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1089:24)
at AST_Var.eval (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:999:32)
at TreeWalker._visit (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1546:21)
at AST_Var._walk (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:996:24)
at walk_body (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:510:17)
- codeFrame: Cannot read property '_walk' of null
- errorMessage: Build Canceled: Broccoli Builder ran into an error with `UglifyWriter` plugin. 💥
Cannot read property '_walk' of null
- errorType: Build Error
- location:
- column: [undefined]
- file: [undefined]
- line: [undefined]
- treeDir: [undefined]
- message: Build Canceled: Broccoli Builder ran into an error with `UglifyWriter` plugin. 💥
Cannot read property '_walk' of null
- name: Error
- nodeAnnotation: UglifyWriter
- nodeName: UglifyWriter
- originalErrorMessage: Cannot read property '_walk' of null
- stack: TypeError: Cannot read property '_walk' of null
at AST_Dot.eval (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1145:29)
at TreeWalker._visit (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1546:21)
at AST_Dot._walk (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1144:24)
at AST_VarDef.eval (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1091:40)
at TreeWalker._visit (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1546:21)
at AST_VarDef._walk (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1089:24)
at AST_Var.eval (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:999:32)
at TreeWalker._visit (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:1546:21)
at AST_Var._walk (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:996:24)
at walk_body (eval at <anonymous> (/Users/z002fawe/Projects/product-advisor/test/pa-aurora-frontend/node_modules/terser/tools/node.js:21:1), <anonymous>:510:17)
=================================================================================
Output from ember version --verbose && npm --version && yarn --version:
ember-cli: 3.4.1
http_parser: 2.8.0
node: 10.9.0
v8: 6.8.275.24-node.14
uv: 1.22.0
zlib: 1.2.11
ares: 1.14.0
modules: 64
nghttp2: 1.32.0
napi: 3
openssl: 1.1.0i
icu: 62.1
unicode: 11.0
cldr: 33.1
tz: 2018e
os: darwin x64
6.4.1
1.6.0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 18 (7 by maintainers)
Commits related to this issue
- fixing production build issue this https://github.com/ember-cli/ember-cli/issues/8075 — committed to aklkv/ember-website by aklkv 6 years ago
- fixing production build issue this https://github.com/ember-cli/ember-cli/issues/8075 — committed to aklkv/ember-website by aklkv 6 years ago
- fixing production build issue this https://github.com/ember-cli/ember-cli/issues/8075 — committed to aklkv/ember-website by aklkv 6 years ago
- Fix (docs) Workaround for https://github.com/ember-cli/ember-cli/issues/8075 — committed to sauce-consultants/ember-ux-sauce by th3hamburgler 6 years ago
- build(deploy): fix `TypeError: Cannot read property '_walk' of null` https://github.com/ember-cli/ember-cli/issues/8075#issuecomment-426046159 https://github.com/terser-js/terser/issues/120 — committed to alexdiliberto/ember-transformicons by alexdiliberto 5 years ago
I’m working on the same problem in a completely different stack.
UPDATE: Hey @bajcmartinez and @guneetsinghbhatia I was able to get my build working by adding configuration for uglify-js! The relevant config change was as follows:
Note that
reduce_vars: falsealso got the build running again, but the artifact size was larger so I opted to stick with collapse for now. Also, this change was inspired by: https://github.com/mishoo/UglifyJS2/issues/1609@rwjblue This is the snippet I used
@rwwagner90 check
package-lock.json. In my case, I wasn’t using tether directly either, but I looked into that file and noticed it was required byember-tooltips(i.e.ember-tooltips <- ember-tether <-tether