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

Build fails on 4.12.0 if project folder name contains ember-data- #8606

Open
dagroe opened this issue May 16, 2023 · 10 comments
Open

Build fails on 4.12.0 if project folder name contains ember-data- #8606

dagroe opened this issue May 16, 2023 · 10 comments
Labels
upstream Upstream Dependency Fix Required

Comments

@dagroe
Copy link
Contributor

dagroe commented May 16, 2023

Build fails on 4.12.0

Reproduction

  • create new ember project: ember new ember-data-bug --lang en using ember-cli: 4.12.1 node: 18.13.0
  • upgrade ember-data to 4.12.0
  • build fails with [NodeWrapper:8 /Users/myuser/ember-data-bug/tests] is not a SourceNode

I also tried to upgrade all dependencies to latest and pin them in my reproduction here: https://github.com/dagroe/ed-bug-reproduction

Description

I tried a bunch of different combinations, e.g. plain new ember install, upgrade all to latest, upgrade everything to latest but set ember-source: 4.12.0. Tried yarn and npm installs.

Everything works fine on 4.11.3 but fails with the error above on 4.12.0

Versions

└─ ember-data-bug@workspace:.
   └─ ember-source@npm:4.12.0 [a2ed2] (via npm:4.12.0 [a2ed2])
└─ ember-data-bug@workspace:.
   └─ ember-cli@npm:4.12.1 (via npm:4.12.1)
└─ ember-data-bug@workspace:.
   └─ ember-data@npm:4.12.0 [a2ed2] (via npm:4.12.0 [a2ed2])
@runspired
Copy link
Contributor

As far as I can tell builds are working with 4.12

@runspired
Copy link
Contributor

Closing because even the reproduction app works when I run yarn to install and ember build to build or ember serve to serve

@dagroe
Copy link
Contributor Author

dagroe commented May 17, 2023

Very strange. Indeed, when I clone the repo it runs fine.

Drove me almost crazy, since the exact same project didn't run in my original folder where I created it. Finally I found that the error occurs when the project folder name includes the string ember-data. My original project was in folder ember-data-bug but I pushed it to github as ed-bug-reproduction. When I clone the ed-bug-reproduction repo into something like ember-data-test I get the error described above.

@runspired runspired reopened this May 24, 2023
@runspired runspired changed the title Build fails on 4.12.0 Build fails on 4.12.0 if project folder name contains ember-data- May 24, 2023
@gilest
Copy link

gilest commented Jun 13, 2023

I have also (accidentally) encountered this in ember-data v5.

Cloning a app repository name containing ember-data

(This repo is an app generated by ember-cli v5)

git clone git@github.com:gilest/ember-data-dir-name.git
cd ember-data-dir-name && pnpm install && pnpm start

Output ❌

[NodeWrapper:0 /Users/Giles/code/repros/ember-data-dir-name/node_modules/.pnpm/registry.npmjs.org+@ember+optional-features@2.0.0/node_modules/@ember/optional-features] is not a SourceNode

Cloning same repo into a different-directory

git clone git@github.com:gilest/ember-data-dir-name.git different-directory
cd different-directory && pnpm install && pnpm start

Output ✅

Build successful (4928ms) – Serving on http://localhost:4200/

@runspired
Copy link
Contributor

@gilest yeah its honestly one of the most curious bugs I've heard in a long time and ordinarily I'd jump at investigating but haven't had time. Would love a report/fix if you can dig around, its... WAT

@gilest
Copy link

gilest commented Jun 13, 2023

Not sure I'll get all the way to a fix but it occurs...

  • with both pnpm and yarn
  • only when the ember-data package is installed
  • when running a development or test server (with livereload). NOT when running ember test (no server)
  • with both classic and Embroider builds

NodeWrapper is something in Broccoli maybe?

Yes, error thrown from here.

🤷🏻 opened a Broccoli issue broccolijs/broccoli/issues/503

@bertdeblock
Copy link
Member

bertdeblock commented Jul 11, 2023

Running into the same issue. My addon's name is @bagaaravel/ember-data-extensions.
On my machine the folder name was ember-data-extensions. Renaming the folder "fixes" it.

@runspired
Copy link
Contributor

@bertdeblock think you could dig into the broccoli side a bit?

@runspired
Copy link
Contributor

The only EmberData code I could imagine might interplay to result in this has existed a long time. It's this check:

https://github.com/emberjs/data/blob/4251fd7105ea9a8eae17efb4e3bf8bb795b42ca4/packages/private-build-infra/src/addon-build-config-for-data-package.js#L118C5-L127C7

but reading that I don't see how it could affect.

@bertdeblock
Copy link
Member

@runspired I've been looking into it a bit, but haven't found anything yet. Might continue looking at it today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Upstream Dependency Fix Required
Projects
Status: No status
Development

No branches or pull requests

4 participants