simonihmig / ember-cli-bundle-analyzer

Analyze the size and contents of your Ember app's bundles
MIT License
99 stars 2 forks source link

Addon stopped working #74

Closed lvegerano closed 4 years ago

lvegerano commented 4 years ago

I've been trying to get this addon working again but always errors out. We're using ember 3.14 in octane mode. We have 3 engines in our codebase. Any help would be appreciated.

=================================================================================

ENV Summary:

  TIME: Tue May 12 2020 12:29:35 GMT-0500 (Central Daylight Time)
  TITLE: ember
  ARGV:
  - /Users/luis/.nvm/versions/node/v12.16.2/bin/node
  - /Users/luis/.nvm/versions/node/v12.16.2/bin/ember
  - serve
  - --environment
  - local
  - --output-path
  - ../_build/web
  EXEC_PATH: /Users/luis/.nvm/versions/node/v12.16.2/bin/node
  TMPDIR: /var/folders/h0/zwrglzfs0f9c_p2bk0fqv4ch0000gn/T
  SHELL: /bin/zsh
  PATH:
  - /Users/luis/github/coschedule/node_modules/.bin
  - /Users/luis/github/node_modules/.bin
  - /Users/luis/node_modules/.bin
  - /Users/node_modules/.bin
  - /node_modules/.bin
  - /Users/luis/.nvm/versions/node/v12.16.2/bin
  - /Users/luis/.nvm/versions/node/v12.16.2/bin
  - /usr/local/bin
  - /usr/bin
  - /bin
  - /usr/sbin
  - /sbin
  PLATFORM: darwin x64
  FREEMEM: 269516800
  TOTALMEM: 17179869184
  UPTIME: 818971
  LOADAVG: 11.5927734375,10.1416015625,6.44384765625
  CPUS:
  - Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 2500
  - Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 2500
  - Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 2500
  - Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 2500
  - Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 2500
  - Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 2500
  - Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 2500
  - Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 2500
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.15.0
  - brotli: 1.0.7
  - cldr: 36.0
  - http_parser: 2.9.3
  - icu: 65.1
  - llhttp: 2.0.4
  - modules: 72
  - napi: 5
  - nghttp2: 1.40.0
  - node: 12.16.2
  - openssl: 1.1.1e
  - tz: 2019c
  - unicode: 12.1
  - uv: 1.34.2
  - v8: 7.8.279.23-node.34
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: [undefined]
  - codeFrame: [undefined]
  - errorMessage: Unterminated string constant
  - errorType: [undefined]
  - location:
    - column: 13
    - file: 0
    - line: 110184
  - message: Unterminated string constant
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: Error: Unterminated string constant
    at objectToError (/Users/luis/github/coschedule/web/node_modules/broccoli-concat-analyser/node_modules/workerpool/lib/WorkerHandler.js:63:14)
    at ChildProcess.<anonymous> (/Users/luis/github/coschedule/web/node_modules/broccoli-concat-analyser/node_modules/workerpool/lib/WorkerHandler.js:146:32)
    at ChildProcess.emit (events.js:310:20)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)

=================================================================================
simonihmig commented 4 years ago

The error stems from the workerpool package. "Unterminated string constant" is weird, maybe a corrupt package installation? Could you please try to install the latest version of it? E.g. yarn upgrade if you use yarn with a lockfile.

lucacorti commented 4 years ago

@simonihmig same here, yarn upgrade or a pristine install of dependencies have no effect. I'm on ember-cli@3.19.0/ember-source@3.20.1.

oliverlj commented 4 years ago
=================================================================================

ENV Summary:

  TIME: Sat Aug 15 2020 08:43:08 GMT+0200 (Central European Summer Time)
  TITLE: ember
  ARGV:
  - /home/oliver/.volta/tools/image/node/12.18.3/bin/node
  - /home/oliver/git/fritzy/front/fz-front-simulator/node_modules/.bin/ember
  - serve
  EXEC_PATH: /home/oliver/.volta/tools/image/node/12.18.3/bin/node
  TMPDIR: /tmp
  SHELL: /bin/bash
  PATH:
  - /tmp/yarn--1597473703767-0.9063960182203581
  - /home/oliver/git/fritzy/front/fz-front-simulator/node_modules/.bin
  - /home/oliver/.local/share/yarn/link/node_modules/.bin
  - /home/oliver/.yarn/bin
  - /home/oliver/.volta/tools/image/node/12.18.3/libexec/lib/node_modules/npm/bin/node-gyp-bin
  - /home/oliver/.volta/tools/image/node/12.18.3/lib/node_modules/npm/bin/node-gyp-bin
  - /home/oliver/.volta/tools/image/node/12.18.3/bin/node_modules/npm/bin/node-gyp-bin
  - /home/oliver/.volta/tools/image/npm/6.14.7/bin
  - /home/oliver/.volta/tools/image/yarn/1.22.4/bin
  - /home/oliver/.volta/tools/image/node/12.18.3/bin
  - /home/oliver/.command-tools/platform-tools
  - /home/oliver/.sdkman/candidates/java/current/bin
  - /home/oliver/.command-tools/platform-tools
  - /home/oliver/.cargo/bin
  - /home/oliver/.local/bin
  - /usr/local/sbin
  - /usr/local/bin
  - /usr/sbin
  - /usr/bin
  - /sbin
  - /bin
  - /usr/games
  - /usr/local/games
  - /snap/bin
  PLATFORM: linux x64
  FREEMEM: 5152251904
  TOTALMEM: 25211793408
  UPTIME: 161551
  LOADAVG: 12.72021484375,9.93798828125,8.833984375
  CPUS:
  - AMD Ryzen 5 1600X Six-Core Processor - 3537
  - AMD Ryzen 5 1600X Six-Core Processor - 3627
  - AMD Ryzen 5 1600X Six-Core Processor - 3691
  - AMD Ryzen 5 1600X Six-Core Processor - 3666
  - AMD Ryzen 5 1600X Six-Core Processor - 3612
  - AMD Ryzen 5 1600X Six-Core Processor - 3542
  - AMD Ryzen 5 1600X Six-Core Processor - 3537
  - AMD Ryzen 5 1600X Six-Core Processor - 3627
  - AMD Ryzen 5 1600X Six-Core Processor - 3691
  - AMD Ryzen 5 1600X Six-Core Processor - 3666
  - AMD Ryzen 5 1600X Six-Core Processor - 3612
  - AMD Ryzen 5 1600X Six-Core Processor - 3541
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.16.0
  - brotli: 1.0.7
  - cldr: 37.0
  - http_parser: 2.9.3
  - icu: 67.1
  - llhttp: 2.0.4
  - modules: 72
  - napi: 6
  - nghttp2: 1.41.0
  - node: 12.18.3
  - openssl: 1.1.1g
  - tz: 2019c
  - unicode: 13.0
  - uv: 1.38.0
  - v8: 7.8.279.23-node.39
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: [undefined]
  - codeFrame: [undefined]
  - errorMessage: Unexpected token name «n», expected punc «)»
  - errorType: [undefined]
  - location:
    - column: 39
    - file: 0
    - line: 5212
  - message: Unexpected token name «n», expected punc «)»
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: Error: Unexpected token name «n», expected punc «)»
    at objectToError (/home/oliver/git/fritzy/front/fz-front-simulator/node_modules/workerpool/lib/WorkerHandler.js:63:14)
    at ChildProcess.<anonymous> (/home/oliver/git/fritzy/front/fz-front-simulator/node_modules/workerpool/lib/WorkerHandler.js:146:32)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.EventEmitter.emit (domain.js:483:12)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)

maybe related ?

A repo can be found here : https://gitlab.com/fritzy/front/fz-front-simulator/-/tree/ember-cli-bundle-analyzer

lucacorti commented 4 years ago

It seems to be working again for me on ember-cli@3.21.1. Probably fixed in some dependency update.

lifeart commented 4 years ago

getting error on 3.21.1

Unexpected token: punc (.)

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: [undefined]
  - codeFrame: [undefined]
  - errorMessage: Unexpected token: punc (.)
  - errorType: [undefined]
  - location:
    - column: 26
    - file: 0
    - line: 708
  - message: Unexpected token: punc (.)
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: Error: Unexpected token: punc (.)
    at objectToError (C:\Users\lifeart\Documents\repos\brn\frontend\node_modules\broccoli-concat-analyser\node_modules\workerpool\lib\WorkerHandler.js:63:14)
    at ChildProcess.<anonymous> (C:\Users\lifeart\Documents\repos\brn\frontend\node_modules\broccoli-concat-analyser\node_modules\workerpool\lib\WorkerHandler.js:146:32)
    at ChildProcess.emit (events.js:321:20)
    at ChildProcess.EventEmitter.emit (domain.js:482:12)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
lifeart commented 4 years ago

may be related to https://github.com/ember-cli/ember-cli/issues/9290, but, I already have "ember-cli-terser": "^4.0.0" installed, and looks like it's an around it error

lifeart commented 4 years ago

looks like this dep should be updated: https://github.com/stefanpenner/broccoli-concat-analyser/blob/master/package.json#L27

Valgueiro commented 4 years ago

Any updates on this? I'm having the same error in ember 3.18

lifeart commented 4 years ago

@Valgueiro, this changes should solve issue: https://github.com/stefanpenner/broccoli-concat-analyser/pulls, but I need some time on MR splitting, could you try to run ember-cli-bundle-analyzer with pinned broccoli-concat-analyser to this pr?

lifeart commented 4 years ago

https://github.com/stefanpenner/broccoli-concat-analyser/pull/52

simonihmig commented 4 years ago

Published v0.2.2 that should fix this, thanks to the upstream work of @lifeart! :tada: