Closed kodeine closed 11 months ago
Hi there @kodeine ! Thanks for filing an issue!
I cloned your repo and:
I tried npm i
but I got the following error: https://app.warp.dev/block/EghamICNTaW2H5sc5hvAxX. I deleted package-lock.json
and tried re-installing and I got the same issue. I ended up --force
installing, which is definitely not optimal (and bug-prone, I suppose?). So maybe the dependencies are a bit messed up in this case?
I just noticed in your nx report
that there's a mismatch in the versions of your Nx packages. For Nx to work properly, all @nx/*
packages should have the same version! Your Nx report as you posted it:
nx : 16.5.5
@nx/js : 16.2.2
@nx/jest : 16.5.5
@nx/linter : 16.5.5
@nx/workspace : 16.5.5
@nx/devkit : 16.5.5
@nx/eslint-plugin : 16.5.5
@nx/nest : 16.5.5
@nx/node : 16.5.5
@nrwl/tao : 16.5.5
@nx/webpack : 16.5.5
In the repo that you shared, the versions are indeed aligned. And I can reproduce your issue, however ONLY if I --force
install, as I said.
So, in conclusion, I do think that the issue could be in your dependencies, since npm
threw that error when trying to install. At the moment, you cannot install anything unless you --force
it, so it's clear that there's an issue there with the version mismatches..
@mandarini thank you for looking into this.
git pull
and npm i
and it will compile fine without errors.@nx/js: 16.2.2
then everything works, as soon i bump nx/js
to 16.5.5
or latest
, nx serve
breaks.docker-compose
file to setup mongo
as well which you will need.Thank you
@mandarini @AgentEnder sorry for the tag. Is there any update on this?
Hi @kodeine ! Let me look into this, again.
@kodeine yeah I could finally successfully reproduce your issue, but I still cannot figure out why it's happening. The issue it seems to start happening at Nx version 16.3.0
. So one version up from 16.2.1
where it's working.
I see in your commit history that there was an issue already with mikro-orm and rspack. Is this the same issue, which surfaced again with your upgrade to a newer version than 16.2.1
?
In any case, these are all the changes to the @nx/js
package between versions 16.2.1
and 16.3.0
(click to compare), and I'm trying to figure out which change could have affected mikro-orm
again:
js: postProcessInlinedDependencies throwing error on movePackage (#16127) (dfa19f5)
js: set node_env when building with esbuild (#17251) (923e6d8)
js: sourcemaps should work with js:node executor (#17261) (f01cdca)
js: log config file errors correctly (#17311) (2865b8d)
js: should check for all possible prettierrc formats before creating a default one (#17157) ([911f753](911f753...
js: add location none to verdaccio executor (#17319) (72b0f55)
js: allow root js lib project to be generated (#17245) (3634abb)
But again I would like to know if this is the same error you experienced before, please.
Thank you for your patience!
I created my forks with the repros and steps to repro:
What I did, to make sure all the rest of the package versions are as expected, I used this commit, which is the last commit before you upgrade to Nx version 16.6.0
, and ran nx migrate 16.3.0
. Indeed, that's where the PrimaryKey
error first appears. Then I made a new branch off of that one, and I only downgraded the @nx/js
package. And there, the PrimaryKey
error disappears.
@mandarini Thank you for looking into this, to answer your question, i don't think i faced this issue previously. i was trying to use ts-node-dev instead of ts-node near to that commit you mentioned. but couldnt make ts-node-dev work.
@kodeine, @jaysoo took over and found the issue! :D
Can you try setting "sourceMap": false
in your project.json
, even for development
? This should fix it.
@mandarini just confirmed and it works, wow could never have thought sourceMap would fix it. Thanks a bunch to @jaysoo as well as you.
i can keep sourceMap true in production? or this is a temporary fix?
Not sure, you can try it out and see? something is generating wrong sourcemaps, maybe on the rspack side.
should i be doing nx migrate latest
yes, definitely! I already tried it in your project, and it worked! :) Which it always does hehe
@mandarini thank you so much, i have shared this thread with RsPack team. Hopefully we will be able to find the root cause for this source maps issue.
I will close this issue now, but if it turns out it's on the Nx side, we can reopen!
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
[Nest] 19541 - 08/06/2023, 1:48:41 PM ERROR [ExceptionHandler] Account entity is missing @PrimaryKey() MetadataError: Account entity is missing @PrimaryKey()
Expected Behavior
no errors on serve/ compile
GitHub Repo
https://github.com/kodeine/NX/
Steps to Reproduce
1.clone github repo to reproduce you can try https://github.com/kodeine/NX/
nx serve rspack-test
Note: it works fine on commit
4d69223
but on5f4d4d9
it gives above error,rspack + nx
were updated in last commit. updating @nx/js from 16.2.1 to 16.6.0 breaks it.Nx Report
Failure Logs
to reproduce you can try https://github.com/kodeine/NX/
nx serve rspack-test
it works fine on commit
4d69223
but on5f4d4d9
it gives above error,rspack + nx
were updated in last commit.@nx/js 16.2.1 to 16.6.0 breaks nestjs + mikroorm + rspack.