emberjs / ember.js

Ember.js - A JavaScript framework for creating ambitious web applications
https://emberjs.com
MIT License
22.47k stars 4.21k forks source link

Build is failing after upgrading from v3.20.2 to 3.28.5 #20034

Open IsakFriisJespersen2 opened 2 years ago

IsakFriisJespersen2 commented 2 years ago

After running ember-cli-update --to 3.28.5 my build started failing with error statet below.

I've tried to overried ember-cli-htmlbars: "^5.7.1" but with no luck..


  TIME: Fri Mar 18 2022 16:22:56 GMT+0100 (Central European Standard Time)
  TITLE: ember
  ARGV:
  - /usr/local/bin/node
  - /opt/homebrew/bin/ember
  - serve
  EXEC_PATH: /usr/local/bin/node
  TMPDIR: /var/folders/x1/wjx4gtjx75j9cf27zxs9r9mc0000gn/T
  SHELL: /bin/zsh
  PATH:
  - /opt/homebrew/opt/node@14/bin
  - /opt/homebrew/bin
  - /opt/homebrew/sbin
  - /usr/local/bin
  - /usr/bin
  - /bin
  - /usr/sbin
  - /sbin
  - /Applications/Visual Studio Code.app/Contents/Resources/app/bin
  - /Applications/Visual Studio Code.app/Contents/Resources/app/bin
  PLATFORM: darwin x64
  FREEMEM: 23867392
  TOTALMEM: 17179869184
  UPTIME: 613682
  LOADAVG: 16.2197265625,13.16552734375,10.23095703125
  CPUS:
  - Apple M1 - 24
  - Apple M1 - 24
  - Apple M1 - 24
  - Apple M1 - 24
  - Apple M1 - 24
  - Apple M1 - 24
  - Apple M1 - 24
  - Apple M1 - 24
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.18.1
  - brotli: 1.0.9
  - cldr: 40.0
  - icu: 70.1
  - llhttp: 2.1.4
  - modules: 83
  - napi: 8
  - nghttp2: 1.42.0
  - node: 14.19.1
  - openssl: 1.1.1n
  - tz: 2021a3
  - unicode: 14.0
  - uv: 1.42.0
  - v8: 8.4.371.23-node.85
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: TypeError: Cannot read property 'start' of undefined
    at Source.spanFor (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:9016:26)
    at BlockContext.loc (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:13912:26)
    at ElementNormalizer.attr (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14437:30)
    at /Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14309:24
    at Array.map (<anonymous>)
    at ElementNormalizer.ElementNode (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14308:10)
    at StatementNormalizer.normalize (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14156:52)
    at /Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14323:27
    at Array.map (<anonymous>)
    at ElementNormalizer.ElementNode (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14322:41)
  - code: [undefined]
  - codeFrame: Cannot read property 'start' of undefined
  - errorMessage: ember-pro/templates/agencies.hbs: Cannot read property 'start' of undefined
        in /var/folders/x1/wjx4gtjx75j9cf27zxs9r9mc0000gn/T/broccoli-76006LrpA4RJDQxfm/out-739-colocated_template_processor
        at TemplateCompiler
  - errorType: Template Compiler Error
  - location:
    - column: [undefined]
    - file: ember-pro/templates/agencies.hbs
    - line: [undefined]
    - treeDir: /var/folders/x1/wjx4gtjx75j9cf27zxs9r9mc0000gn/T/broccoli-76006LrpA4RJDQxfm/out-739-colocated_template_processor
  - message: ember-pro/templates/agencies.hbs: Cannot read property 'start' of undefined
        in /var/folders/x1/wjx4gtjx75j9cf27zxs9r9mc0000gn/T/broccoli-76006LrpA4RJDQxfm/out-739-colocated_template_processor
        at TemplateCompiler
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: TemplateCompiler
  - originalErrorMessage: Cannot read property 'start' of undefined
  - stack: TypeError: Cannot read property 'start' of undefined
    at Source.spanFor (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:9016:26)
    at BlockContext.loc (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:13912:26)
    at ElementNormalizer.attr (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14437:30)
    at /Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14309:24
    at Array.map (<anonymous>)
    at ElementNormalizer.ElementNode (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14308:10)
    at StatementNormalizer.normalize (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14156:52)
    at /Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14323:27
    at Array.map (<anonymous>)
    at ElementNormalizer.ElementNode (/Users/xxn/booli/pro/ember-pro/node_modules/ember-source/dist/ember-template-compiler.js:14322:41)
```

{
    "name": "ember-pro",
    "version": "0.0.0",
    "private": true,
    "description": "Ember frontend for Booli Pro",
    "repository": "",
    "license": "UNLICENSED",
    "author": "",
    "directories": {
      "doc": "doc",
      "test": "tests"
    },
    "scripts": {
      "build": "ember build --environment=production",
      "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
      "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
      "lint:hbs": "ember-template-lint .",
      "lint:hbs:fix": "ember-template-lint . --fix",
      "lint:js": "eslint . --cache",
      "lint:js:fix": "eslint . --fix",
      "start": "ember serve",
      "test": "npm-run-all lint test:*",
      "test:ember": "ember test",
      "productionbuild": "ember build --environment production",
      "uploadSourceMaps": "curl -s https://api.rollbar.com/api/1/sourcemap -F access_token=$ROLLBAR_ACCESS_TOKEN -F version=$SOURCE_VERSION -F minified_url=$BASE_URL/`echo dist/assets/ember-pro*.js | sed 's:dist/::'` -F source_map=@`echo dist/assets/ember-pro-*.map` > /dev/null"
    },
    "devDependencies": {
      "@babel/core": "^7.12.9",
      "@ember/jquery": "^1.1.0",
      "@ember/optional-features": "^2.0.0",
      "@ember/test-helpers": "^2.4.2",
      "@glimmer/component": "^1.0.4",
      "@glimmer/tracking": "^1.0.4",
      "@types/ember__application": "^4.0.0",
      "@types/ember__array": "^4.0.1",
      "@types/ember__component": "^4.0.4",
      "@types/ember__controller": "^4.0.0",
      "@types/ember__debug": "^4.0.0",
      "@types/ember__engine": "^4.0.0",
      "@types/ember__error": "^4.0.0",
      "@types/ember__object": "^4.0.1",
      "@types/ember__polyfills": "^4.0.0",
      "@types/ember__routing": "^4.0.3",
      "@types/ember__runloop": "^4.0.0",
      "@types/ember__service": "^4.0.0",
      "@types/ember__string": "^3.0.9",
      "@types/ember__template": "^4.0.0",
      "@types/ember__test": "^4.0.0",
      "@types/ember__test-helpers": "^2.6.1",
      "@types/ember__utils": "^4.0.0",
      "@types/ember-data": "^4.0.0",
      "@types/ember-data__adapter": "^4.0.0",
      "@types/ember-data__model": "^4.0.0",
      "@types/ember-data__serializer": "^4.0.0",
      "@types/ember-data__store": "^4.0.0",
      "@types/ember-qunit": "^5.0.0",
      "@types/ember-resolver": "^5.0.11",
      "@types/htmlbars-inline-precompile": "^3.0.0",
      "@types/jquery": "^3.5.13",
      "@types/leaflet": "^1.7.9",
      "@types/qunit": "^2.11.3",
      "@types/rsvp": "^4.0.4",
      "babel-eslint": "^10.1.0",
      "bootstrap": "^4.5.3",
      "bowser": "^1.9.4",
      "broccoli-asset-rev": "^3.0.0",
      "broccoli-merge-trees": "^3.0.1",
      "broccoli-static-compiler": "^0.2.2",
      "d3": "^5.16.0",
      "ember-auto-import": "^1.11.3",
      "ember-basic-dropdown": "^3.0.11",
      "ember-body-class": "^1.1.4",
      "ember-cli": "~3.28.0",
      "ember-cli-analytics": "^1.4.1",
      "ember-cli-app-version": "^5.0.0",
      "ember-cli-babel": "^7.26.6",
      "ember-cli-dependency-checker": "^3.2.0",
      "ember-cli-htmlbars": "^5.7.1",
      "ember-cli-inject-live-reload": "^2.1.0",
      "ember-cli-mirage": "^2.0.1",
      "ember-cli-node-assets": "^0.2.2",
      "ember-cli-sass": "^10.0.1",
      "ember-cli-sri": "^2.1.1",
      "ember-cli-terser": "^4.0.2",
      "ember-cli-typescript": "^5.0.0",
      "ember-cli-typescript-blueprints": "^3.0.0",
      "ember-composable-helpers": "^5.0.0",
      "ember-concurrency": "^1.0.0",
      "ember-concurrency-ts": "^0.3.1",
      "ember-d3": "^0.5.1",
      "ember-data": "~3.28.0",
      "ember-export-application-global": "^2.0.1",
      "ember-fetch": "^8.1.1",
      "ember-file-upload": "^2.7.0",
      "ember-hammertime": "^1.6.0",
      "ember-leaflet": "^4.1.1",
      "ember-leaflet-draw-controls": "^0.7.4",
      "ember-leaflet-marker-cluster": "^1.0.1",
      "ember-load-initializers": "^2.1.2",
      "ember-maybe-import-regenerator": "^0.1.6",
      "ember-page-title": "^6.2.2",
      "ember-power-calendar": "^0.16.2",
      "ember-power-calendar-moment": "^0.1.7",
      "ember-power-datepicker": "^0.8.1",
      "ember-power-select": "^4.1.0",
      "ember-qunit": "^5.1.4",
      "ember-radio-button": "^2.0.1",
      "ember-resize": "0.3.4",
      "ember-resolver": "^8.0.2",
      "ember-simple-auth": "^3.0.0",
      "ember-source": "~3.28.0",
      "ember-template-lint": "^3.16.0",
      "ember-text-measurer": "^0.6.0",
      "ember-truth-helpers": "^3.0.0",
      "eslint": "^7.32.0",
      "eslint-config-prettier": "^8.3.0",
      "eslint-plugin-ember": "^10.5.4",
      "eslint-plugin-node": "^11.1.0",
      "eslint-plugin-prettier": "^3.4.1",
      "eslint-plugin-qunit": "^6.2.0",
      "file-saver": "^1.3.8",
      "font-awesome": "^4.7.0",
      "leaflet": "^1.7.1",
      "loader.js": "^4.7.0",
      "moment": "^2.29.1",
      "npm-run-all": "^4.1.5",
      "popper.js": "^1.16.1",
      "prettier": "^2.3.2",
      "qs": "^6.5.2",
      "qunit": "^2.16.0",
      "qunit-dom": "^1.6.0",
      "rollbar": "^2.19.4",
      "sass": "^1.29.0",
      "typescript": "^4.5.5",
      "xlsx": "^0.17.3"
    },
    "engines": {
      "node": "12.* || 14.* || >= 16"
    },
    "ember": {
      "edition": "octane"
    },
    "dependencies": {
      "acorn": "^8.0.4"
    },
    "overrides": {
      "ember-cli-htmlbars": "^5.7.1"
    }
  }
danr1979 commented 2 years ago

I am also experiencing this issue after upgrading from Ember 3.24.0 to 3.26.1. No specific dependencies seem to be mentioned and I'm not sure where the "start" property is defined.

foxtree commented 2 years ago

I encountered a similar problem.

Do you get beyond this error if you remove ember-hammertime ?

For me, the strange thing was that after enabling all DEBUG messages, via: yarn && DEBUG=* node_modules/.bin/ember build

...there was no occurrence of "hammertime" in the last 10,000 lines of the build logs.

So, I think this is an ember-source bug:

The dependency that ember build chokes on seems like a very basic thing that the build process should be correctly logging!

chriskrycho commented 2 years ago

There were updates to the Glimmer VM and template compiler which landed in Ember 3.25, which are likely what is causing these. Make sure your app and the addons you use are working with the latest versions of ember-cli-htmlbars, which have bug fixes for a lot of these behaviors.

IsakFriisJespersen2 commented 1 year ago

I've seen people mentioning the same issue in ember-basic-dropdown but my error like this one come from the project source and not from any addon.

Have anyone found a solution for this?

gtb104 commented 1 year ago

I'm experiencing the same issue, and I believe it's due to the flexi library. If I remove the usage of flexi tags in a template that I know is failing, it then passes the build.

How do we work around these libraries that seem to be outdated?