FortAwesome / ember-fontawesome

Font Awesome Ember component using SVG with JS
https://fontawesome.com
MIT License
119 stars 49 forks source link

Unterminated string constant #143

Open allthesignals opened 4 years ago

allthesignals commented 4 years ago

Describe the bug I've run into a really baffling problem where I cannot get my Ember app to build due to an "unterminated string constant" during the rollup process.

image

I cannot understand where the source of the issue is.

    "@fortawesome/ember-fontawesome": "^0.2.1",
    "@fortawesome/free-brands-svg-icons": "^5.2.0",
    "@fortawesome/free-regular-svg-icons": "^5.1.0",
    "@fortawesome/free-solid-svg-icons": "^5.2.0",

Here's my yarn.lock: https://gist.github.com/allthesignals/9ff91ab416910c26edfb1278f2cbcb3f#file-yarn-lock

Here are the contents of the log file.

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

ENV Summary:

TIME: Tue Apr 21 2020 22:33:12 GMT-0400 (Eastern Daylight Time) TITLE: ember ARGV:

  • /Users/wmattgardner/.nvm/versions/node/v10.15.3/bin/node
  • /usr/local/bin/ember
  • s EXEC_PATH: /Users/wmattgardner/.nvm/versions/node/v10.15.3/bin/node TMPDIR: /var/folders/x5/wkqy3c414sjgdr1j2498xzq40000gr/T SHELL: /bin/bash PATH:
  • /Users/wmattgardner/.rvm/gems/ruby-2.6.4/bin
  • /Users/wmattgardner/.rvm/gems/ruby-2.6.4@global/bin
  • /Users/wmattgardner/.rvm/rubies/ruby-2.6.4/bin
  • /Users/wmattgardner/.nvm/versions/node/v10.15.3/bin
  • ~/bin
  • /usr/local/sbin
  • /usr/local/bin
  • /usr/bin
  • /bin
  • /usr/sbin
  • /sbin
  • /Users/wmattgardner/.rvm/bin PLATFORM: darwin x64 FREEMEM: 50106368 TOTALMEM: 8589934592 UPTIME: 2872 LOADAVG: 16.23779296875,11.29345703125,9.470703125 CPUS:
  • Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz - 2300
  • Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz - 2300
  • Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz - 2300
  • Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz - 2300 ENDIANNESS: LE VERSIONS:
  • ares: 1.15.0
  • cldr: 33.1
  • http_parser: 2.8.0
  • icu: 62.1
  • modules: 64
  • napi: 3
  • nghttp2: 1.34.0
  • node: 10.15.3
  • openssl: 1.1.0j
  • tz: 2018e
  • unicode: 11.0
  • uv: 1.23.2
  • v8: 6.8.275.32-node.51
  • zlib: 1.2.11

ERROR Summary:

  • broccoliBuilderErrorStack: Error: Unterminated string constant at error (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:224:15) at Module.error (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:16788:9) at tryParse (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:16459:16) at Module.setSource (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:16514:24) at /Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:19375:20
  • code: [undefined]
  • codeFrame: Unterminated string constant
  • errorMessage: Unterminated string constant at free-solid-svg-icons-rollup -~- created here: -~- at new Plugin (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-plugin/index.js:7:31) at new Rollup (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/dist/index.js:39:9) at Object.keys.forEach.pack (/Users/wmattgardner/labs-zap-search/node_modules/@fortawesome/ember-fontawesome/index.js:37:26) at Array.forEach () at Class.treeForVendor (/Users/wmattgardner/labs-zap-search/node_modules/@fortawesome/ember-fontawesome/index.js:26:47) at Class._treeFor (/Users/wmattgardner/labs-zap-search/node_modules/ember-cli/lib/models/addon.js:668:33) at Class.treeFor (/Users/wmattgardner/labs-zap-search/node_modules/ember-cli/lib/models/addon.js:628:21) at project.addons.reduce (/Users/wmattgardner/labs-zap-search/node_modules/ember-cli/lib/broccoli/ember-app.js:701:26) at Array.reduce () at EmberApp._addonTreesFor (/Users/wmattgardner/labs-zap-search/node_modules/ember-cli/lib/broccoli/ember-app.js:699:32) -~- (end) -~-
  • errorType: Build Error
  • location:
    • column: [undefined]
    • file: [undefined]
    • line: [undefined]
    • treeDir: [undefined]
  • message: Unterminated string constant at free-solid-svg-icons-rollup -~- created here: -~- at new Plugin (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-plugin/index.js:7:31) at new Rollup (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/dist/index.js:39:9) at Object.keys.forEach.pack (/Users/wmattgardner/labs-zap-search/node_modules/@fortawesome/ember-fontawesome/index.js:37:26) at Array.forEach () at Class.treeForVendor (/Users/wmattgardner/labs-zap-search/node_modules/@fortawesome/ember-fontawesome/index.js:26:47) at Class._treeFor (/Users/wmattgardner/labs-zap-search/node_modules/ember-cli/lib/models/addon.js:668:33) at Class.treeFor (/Users/wmattgardner/labs-zap-search/node_modules/ember-cli/lib/models/addon.js:628:21) at project.addons.reduce (/Users/wmattgardner/labs-zap-search/node_modules/ember-cli/lib/broccoli/ember-app.js:701:26) at Array.reduce () at EmberApp._addonTreesFor (/Users/wmattgardner/labs-zap-search/node_modules/ember-cli/lib/broccoli/ember-app.js:699:32) -~- (end) -~-
  • name: Error
  • nodeAnnotation: [undefined]
  • nodeName: free-solid-svg-icons-rollup
  • originalErrorMessage: Unterminated string constant
  • stack: Error: Unterminated string constant at error (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:224:15) at Module.error (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:16788:9) at tryParse (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:16459:16) at Module.setSource (/Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:16514:24) at /Users/wmattgardner/labs-zap-search/node_modules/broccoli-rollup/node_modules/rollup/dist/rollup.js:19375:20

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

jrjohnson commented 4 years ago

Thanks for the report, do you have a branch I can checkout and run with this error? I'm not seeing anything obvious in your logs.

allthesignals commented 4 years ago

Hi @jrjohnson! Here's what I'm seeing it:

https://github.com/NYCPlanning/labs-zap-search/tree/1202-upgrade-ember-octane

The upgrade isn't complete, but the app should at least build.

Thanks!

jrjohnson commented 4 years ago

Cloning that branch, running yarn install, and yarn start results in a completed build and a working app for me. Maybe your local dependency tree is out of sync with the yarn.lock in that branch? First though is to do a rm -rf node_modules; yarn install

allthesignals commented 4 years ago

Thanks for trying that out @jrjohnson. This is very odd.

Seeing it again on another project, at this commit: https://github.com/NYCPlanning/labs-applicant-portal/commit/1eb3234181591a3f339deb28b086c677bae65f3f

image

What's weird is that it works in CI (the tests do fail, but that's okay, it builds): https://app.circleci.com/pipelines/github/NYCPlanning/labs-applicant-portal/390/workflows/d896c8d6-de79-44d8-a27a-63abda8605b5/jobs/765/steps

This time, I've blown out node_module, removed yarn.lock, and it still fails on my machine.