embroider-build / embroider

Compiling Ember apps into spec-compliant, modern Javascript.
MIT License
337 stars 136 forks source link

build failure pointing to ember-data and embroider #640

Open abhilashlr opened 3 years ago

abhilashlr commented 3 years ago

I seem to be getting the following error on step 1 which is simply replacing the app.toTree to webpack config.

-private/utils/serialize-into-hash.js: [BABEL] <~>/-private/utils/serialize-into-hash.js: Cannot read property 'chrome' of undefined (While processing: "<~>/node_modules/@babel/preset-env/lib/index.js")
        in /var/folders/fc/ykwvg6_j0mx3stncvp8tkdbr0000gn/T/broccoli-51939cZt3jY9majn6/out-04-funnel
        at broccoli-persistent-filter:Babel > [Babel: @ember-data/adapter] (Babel: @ember-data/adapter)

ember: 3.23 ember-data: ~3.23~ 3.22

abhilashlr commented 3 years ago

Also tried:

const { V1Addon } = require('@embroider/compat');

class EmberDataCompatAdapter extends V1Addon {
  get packageMeta() {
    let meta = super.packageMeta;
    meta = forceIncludeModule(meta, './-private');

    return meta;
  }
}

return require('@embroider/compat').compatBuild(app, Webpack, {
    compatAdapters: new Map([
      ['@ember-data/model', EmberDataCompatAdapter],
      ['@ember-data/record-data', EmberDataCompatAdapter],
      ['@ember-data/adapter', EmberDataCompatAdapter],
    ])
  });

but that doesn't work either

ef4 commented 3 years ago

You're on the ember-data beta? Because I don't think 3.23 is released?

I just tried a new app with ember 3.23.0 and ember-data 3.23.0-beta.0 and I didn't reproduce any problem.

That looks like a crash from inside @babel/preset-env. What does your config/targets.js look like?

abhilashlr commented 3 years ago

You're on the ember-data beta? Because I don't think 3.23 is released?

I just tried a new app with ember 3.23.0 and ember-data 3.23.0-beta.0 and I didn't reproduce any problem.

That looks like a crash from inside @babel/preset-env. What does your config/targets.js look like?

Ugh! Sorry about the ember-data thing, it is on 3.22. and the targets, file contains:

  'last 1 Chrome versions',
  'last 1 Firefox versions',
  'last 1 Safari versions'
abhilashlr commented 3 years ago

And I explicitly removed IE support from targets because I had trouble with this issue: https://github.com/emberjs/ember.js/issues/19251

void-mAlex commented 1 year ago

hello @abhilashlr wanted to check if this is still a problem following quite a bit of work that went into both embroider and ember-data since it was opened