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
ember build --watch fails with '[NodeWrapper:4 /path/to/some/folder] is not a SourceNode' when the app name contains 'ember-data' anywhere #10369
Comments
Does this happen with ember-cli 5.1? |
oooo intersting... it does not happen in ember@5.1:
|
I also tested it in ember@5.2.0 explicitly and that worked:
|
I think it's the same issue as this one: emberjs/data#8606 It seems related to the folder name. If it includes |
😫 here's me thinking it's an exact version problem and it's because of the name of the app 😫 I don't know what to do with this issue now 🤔 I would think that we should close it since it's clearly something to do with ember-data's strange build system, but it's a build issue that people will feel with a newly generated app from ember-cli so I kinda want to leave this open 🤔 I suspected it was something to do with rollup because looking at the file it's clearly been put through a rollup process (rollup loves to add |
It seems to be a broccoli issue, actually. This issue was mentioned in the other thread: broccolijs/broccoli#503 Keeping it open for visibility makes sense I think 👍. |
I'm not sure I would agree that it's a broccoli issue if it goes away when you remove the ember-data dependency 😂 the fact that broccoli is doing an It's true that we could work around this by changing broccoli's implementation to use |
@mansona EmberData does not do anything custom in its build at this point. My suspicion is broccoli or some associated ember-cli dep has a loose check somewhere that more or less amounts to |
Anyone got a solution or workaround for this? I've created a fork of: https://www.npmjs.com/package/ember-data-hal-9000 and I'm bumping it to 5.4, but getting the mentioned errors. Edit: I guess the only workaround is to change the name of the package for my fork... |
I'm getting a similar problem on non-ember-data-named-projects, like here: both projects are named here is the error, it looks like something has gone wrong with broccoli -- potentially the broccoli deps don't correctly declare peers or something -- gonna try some resolutions/overrides the SourceNode I'm erroring on is "app" (the app folder!) |
Output from `ember version --verbose && npm --version && pnpm --version`
ember-cli: 5.2.1 node: 16.18.1 v8: 9.4.146.26-node.22 uv: 1.43.0 zlib: 1.2.11 brotli: 1.0.9 ares: 1.18.1 modules: 93 nghttp2: 1.47.0 napi: 8 llhttp: 6.0.10 openssl: 1.1.1q+quic cldr: 41.0 icu: 71.1 tz: 2022b unicode: 14.0 ngtcp2: 0.8.1 nghttp3: 0.7.0 os: darwin x64 8.19.2 8.6.9
The error I'm getting is
[NodeWrapper:4 /Users/mansona/temp/ember-data-watch-problem/node_modules/ember-cli-test-loader/test-support] is not a SourceNode
Full error log
Steps to reproduce
EMBER_CLI_PNPM=true npx ember-cli@latest new --pnpm ember-data-watch-problem
cd ember-data-watch-problem
ember build --watch
Note: I tried it in both pnpm and npm and it had the same issue
Initial debugging
I tracked the issue down to this line: https://github.com/broccolijs/broccoli/blob/master/lib/watcher_adapter.ts#L29 (or rather the js built file that corresponds to that line) and in the debugger the value of
node.constructor.name
isSourceNodeWrapper
The text was updated successfully, but these errors were encountered: