Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Timbuktu1982 opened this issue Jun 10, 2020 · 28 comments

Comments

@Timbuktu1982
Copy link

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)

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

@emogeekface
Copy link

+1

@jtgeibel
Copy link

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.

@runspired
Copy link
Contributor

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?

@Timbuktu1982
Copy link
Author

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

@vihai
Copy link

vihai commented Jun 18, 2020

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
Copy link
Member

rwjblue commented Jun 18, 2020

@rwjblue have you encountered this yet?

No, I haven't seen this.

@amk221
Copy link
Contributor

amk221 commented Jun 19, 2020

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

@gvocale
Copy link

gvocale commented Jun 23, 2020

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

@runspired
Copy link
Contributor

@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.

@amk221
Copy link
Contributor

amk221 commented Jun 30, 2020

Yep, my bad. All fine.

@Nippius
Copy link

Nippius commented Jul 1, 2020

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.

@runspired
Copy link
Contributor

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

@runspired
Copy link
Contributor

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

@Nippius
Copy link

Nippius commented Jul 2, 2020

@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

@Nippius
Copy link

Nippius commented Jul 2, 2020

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

@runspired
Copy link
Contributor

@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.

@runspired
Copy link
Contributor

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

@Nippius
Copy link

Nippius commented Jul 3, 2020

@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.

@runspired
Copy link
Contributor

@Nippius if you aren’t using ember-data then you’ll 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’s explicitly specified.

@Nippius
Copy link

Nippius commented Jul 6, 2020

@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!

@sandstrom
Copy link
Contributor

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?

@Timbuktu1982
Copy link
Author

Hey. It works fine. Thank you!!!

@lcmen
Copy link

lcmen commented Aug 14, 2020

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

@Samsinite
Copy link

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

@runspired
Copy link
Contributor

@Samsinite its not an issue with ember-data but (Mostly) various bugs with how package managers handle updates and hoisting of dependencies. There’s 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.

@DLiblik
Copy link

DLiblik commented Sep 10, 2020

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.

snewcomer added a commit that referenced this issue Sep 12, 2020
Avoid issues found in #7221 and others
runspired pushed a commit that referenced this issue Sep 12, 2020
Avoid issues found in #7221 and others
snewcomer added a commit that referenced this issue Sep 17, 2020
Avoid issues found in #7221 and others
igorT pushed a commit that referenced this issue Sep 17, 2020
Avoid issues found in #7221 and others
snewcomer added a commit that referenced this issue Sep 17, 2020
Avoid issues found in #7221 and others
igorT pushed a commit that referenced this issue Sep 18, 2020
Avoid issues found in #7221 and others
snewcomer added a commit that referenced this issue Sep 18, 2020
Avoid issues found in #7221 and others
@snewcomer
Copy link
Contributor

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

@srsgores
Copy link

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests