Data: Imported DEPRECATE_REFERENCE_INTERNAL_MODEL from @ember-data/private-build-infra/deprecations which is not a supported flag.

Created on 10 Jun 2020  路  28Comments  路  Source: emberjs/data

Hey there...

Since [email protected] i obtain a failure message when i want to build the app with "ember serve".
I have updated all own addons and updated all packages with npm-check (instead of npm update).

I hope you can help me.

Here is the log from ember builder:

ENV Summary:

TIME: Wed Jun 10 2020 08:45:13 GMT+0200 (Mitteleurop盲ische Sommerzeit)
TITLE: ember
ARGV:

  • /usr/local/bin/node
  • /usr/local/bin/ember
  • s
    EXEC_PATH: /usr/local/bin/node
    TMPDIR: /tmp
    SHELL: /bin/bash
    PATH:
  • /opt/xcode/bin
  • /opt/xcode/bin
  • /usr/local/sbin
  • /usr/local/bin
  • /usr/sbin
  • /usr/bin
  • /sbin
  • /bin
  • /usr/games
  • /usr/local/games
  • /snap/bin
    PLATFORM: linux x64
    FREEMEM: 3315044352
    TOTALMEM: 16644083712
    UPTIME: 5353
    LOADAVG: 1.66162109375,1.068359375,1.37158203125
    CPUS:
  • Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz - 3213
  • Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz - 3151
  • Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz - 3151
  • Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz - 3145
    ENDIANNESS: LE
    VERSIONS:
  • ares: 1.16.0
  • brotli: 1.0.7
  • cldr: 36.1
  • icu: 66.1
  • llhttp: 2.0.4
  • modules: 83
  • napi: 6
  • nghttp2: 1.40.0
  • node: 14.1.0
  • openssl: 1.1.1g
  • tz: 2019c
  • unicode: 13.0
  • uv: 1.37.0
  • v8: 8.1.307.31-node.32
  • zlib: 1.2.11

ERROR Summary:

  • broccoliBuilderErrorStack: Error: /var/www/apps/projects/stoma-navi/-private/system/references/reference.ts: Imported DEPRECATE_REFERENCE_INTERNAL_MODEL from @ember-data/private-build-infra/deprecations which is not a supported flag.
    at PluginPass.ImportSpecifier (/var/www/apps/projects/stoma-navi/node_modules/babel-plugin-debug-macros/src/index.js:38:19)
    at newFn (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/visitors.js:179:21)
    at NodePath._call (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/path/context.js:55:20)
    at NodePath.call (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/path/context.js:42:17)
    at NodePath.visit (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/path/context.js:90:31)
    at TraversalContext.visitQueue (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/context.js:112:16)
    at TraversalContext.visitMultiple (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/context.js:79:17)
    at TraversalContext.visit (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/context.js:138:19)
    at Function.traverse.node (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/index.js:84:17)
    at NodePath.visit (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/path/context.js:97:18)
  • code: [undefined]
  • codeFrame: /var/www/apps/projects/stoma-navi/-private/system/references/reference.ts: Imported DEPRECATE_REFERENCE_INTERNAL_MODEL from @ember-data/private-build-infra/deprecations which is not a supported flag.
  • errorMessage: -private/system/references/reference.ts: /var/www/apps/projects/stoma-navi/-private/system/references/reference.ts: Imported DEPRECATE_REFERENCE_INTERNAL_MODEL from @ember-data/private-build-infra/deprecations which is not a supported flag.
    in /tmp/broccoli-476994BR56YQCITg/out-239-funnel
    at broccoli-persistent-filter:Babel > [Babel: @ember-data/store] (Babel: @ember-data/store)
  • errorType: Build Error
  • location:

    • column: [undefined]

    • file: -private/system/references/reference.ts

    • line: [undefined]

    • treeDir: /tmp/broccoli-476994BR56YQCITg/out-239-funnel

  • message: -private/system/references/reference.ts: /var/www/apps/projects/stoma-navi/-private/system/references/reference.ts: Imported DEPRECATE_REFERENCE_INTERNAL_MODEL from @ember-data/private-build-infra/deprecations which is not a supported flag.
    in /tmp/broccoli-476994BR56YQCITg/out-239-funnel
    at broccoli-persistent-filter:Babel > [Babel: @ember-data/store] (Babel: @ember-data/store)
  • name: Error
  • nodeAnnotation: Babel: @ember-data/store
  • nodeName: broccoli-persistent-filter:Babel > [Babel: @ember-data/store]
  • originalErrorMessage: /var/www/apps/projects/stoma-navi/-private/system/references/reference.ts: Imported DEPRECATE_REFERENCE_INTERNAL_MODEL from @ember-data/private-build-infra/deprecations which is not a supported flag.
  • stack: Error: /var/www/apps/projects/stoma-navi/-private/system/references/reference.ts: Imported DEPRECATE_REFERENCE_INTERNAL_MODEL from @ember-data/private-build-infra/deprecations which is not a supported flag.
    at PluginPass.ImportSpecifier (/var/www/apps/projects/stoma-navi/node_modules/babel-plugin-debug-macros/src/index.js:38:19)
    at newFn (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/visitors.js:179:21)
    at NodePath._call (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/path/context.js:55:20)
    at NodePath.call (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/path/context.js:42:17)
    at NodePath.visit (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/path/context.js:90:31)
    at TraversalContext.visitQueue (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/context.js:112:16)
    at TraversalContext.visitMultiple (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/context.js:79:17)
    at TraversalContext.visit (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/context.js:138:19)
    at Function.traverse.node (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/index.js:84:17)
    at NodePath.visit (/var/www/apps/projects/stoma-navi/node_modules/@babel/traverse/lib/path/context.js:97:18)

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

Most helpful comment

Ran in it as well on node v10.15.3. Doing rm -rf node_modules and npm install seems to have fixed it.

All 28 comments

+1

I think this may be related to the node version. I have no problem building in production, where we have 12.18.0. However the bug report shows node 14.1.0 and I'm seeing the same locally with 14.4.0.

We use the esm package to import the file at build time, Node added "support" for ES modules in v13+. Looks like there have been a lot of issues reported to esm and similar libraries where node's native support breaks their functionality. Will think on how to either refactor away our underlying need for esm or figure out support for both if this turns out to be the issue here.

@rwjblue have you encountered this yet?

Thank you for your feedbacks. Will be give a solution in future for newer node-versions?

Tested with nodejs 12.18.1, encountered the problem, removed node_modules, ran npm update, npm install, problem still present, repeated rm, update, install and problem got fixed.

Apparently it is intermittent!

Maybe it is bound to the load order of modules, dunno...

Does it work for you?

@rwjblue have you encountered this yet?

No, I haven't seen this.

I tried with 10.16.0, 12.18.1, and 14.0.0, but my suite fails with the above error for all.

Ran in it as well on node v10.15.3. Doing rm -rf node_modules and npm install seems to have fixed it.

@amk221 did you do a fresh install between node versions? If not then your modules would have been whatever the version of npm the first install used gave you.

Yep, my bad. All fine.

Hi.

I'm having the same issue. I'm running node v12.18.2 and the issue is still there even after a fresh install of node. I don't even use ember-data in my app.

@Nippius what does yarn why ember-data tell you?

@Nippius even better: yarn list --pattern ember-data

@runspired Thanks, here's the output:

yarn list v1.21.1
鈹溾攢 @ember-data/[email protected]
鈹溾攢 @ember-data/[email protected]
鈹溾攢 @ember-data/[email protected]
鈹溾攢 @ember-data/[email protected]
鈹溾攢 @ember-data/[email protected]
鈹溾攢 @ember-data/[email protected]
鈹溾攢 @ember-data/[email protected]
鈹溾攢 @ember-data/[email protected]
鈹溾攢 @ember-data/[email protected]
鈹溾攢 [email protected]
鈹斺攢 [email protected]
Done in 0.90s.

PS: Not sure if relevant but I usually use npm

Ok I don't understand.. after installing yarn, ember b started working! 馃槙

@Nippius thanks! If using npm you can use npm list -s | grep ember-data

I'd like the output of yarn why ember-data or npm ls data if not using yarn. It may be relevant that you usually use npm, they have different resolution algorithms.

@Nippius also feel free to hit me up in discord, may make iteration here faster :)

@runspired Unfortunately I'm on my work PC so I can't install discord :/

I had some free time today so I decided to move to yarn. It's not the first time I've had problems with npm...

Here's the output of yarn why ember-data:
yarn why v1.22.4
[1/4] Why do we have the module "ember-data"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "ember-data"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "908KB"
info Disk size with unique dependencies: "13.35MB"
info Disk size with transitive dependencies: "60.8MB"
info Number of shared dependencies: 181
Done in 29.81s.

Anyway it's building fine now when using yarn, so I'll keep using it.

@Nippius if you aren鈥檛 using ember-data then you鈥檒l save yourself a sizeable chunk by removing it from your package.json 馃槄 was worried another dep was bringing it in for you transitively but that says it鈥檚 explicitly specified.

@runspired ahah fair enough but I'm fairly new to ember (and frontend in general) so I didn't want to mess around with it yet. I've removed it and I'll add it when the time comes :) Thank you once again!

Solved it by doing rm -rf node_modules && npm install as suggested by gvocale. Happened under node v.10.21.0.

Is this an issue with Ember Data? If not, perhaps we can close this issue?

Hey. It works fine. Thank you!!!

Encountered the same problem when I was upgrading from 3.18. rm -rf node moduls && npm install fixed the problem (Node 12.4.0).

Doesn't appear that this is completely resolved on the 3.20 LTS, ran into this today when upgrading from 3.16.

@Samsinite its not an issue with ember-data but (Mostly) various bugs with how package managers handle updates and hoisting of dependencies. There鈥檚 also a set of cases for which folks have more than one dependency on ember-data in their dependency tree leading to potential conflicts. The best bet if you hit this is to blow away node modules and reinstall, but if that still errors then regenerate the lock file, and if that still errors then check why you have more than one version in your dependency tree and work to resolve that.

Upgraded a large project from 3.17 to 3.21 and hit this. npm ci fixed it (deletes node_modules as part of its execution). Didn't think to run the installed tree before I did, but further evidence that it's a dependency tree problem.

Hi all! The fix in #7329 has been backported to lts/release/main branches.

If you're on Netlify and getting this error, clear your cache and deploy:

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlami picture jlami  路  3Comments

Robdel12 picture Robdel12  路  5Comments

jherdman picture jherdman  路  4Comments

kennethlarsen picture kennethlarsen  路  3Comments

graham-sportsmgmt picture graham-sportsmgmt  路  3Comments