Hello I just did this u…

1 minute read

Hello, I just did this upgrade in my deps: But now when running the app I get this error: ERROR in ./main.tsx Module build failed (from /Users/fernando/Code/project/node_modules/babel-loader/lib/index.js): Error: Babel was run with rootMode:"upward" but a root could not be found when searching upward from "/Users/fernando/project/apps/app/src".

Responses:

Did you run nx migrate @nrwl/workspace@latest or something similar to that?

No, I don’t have migrations (that’s what I understand migrate does)

migrations are actually also for the update of nx

https://nx.dev/react/workspace/update

I made the same mistake last time :see_no_evil:

Let me try

Just did, it did this:

yup, and you should also have a migrations.json file in the root of the directory

before you run that migrations file, do npm install or yarn

In some cases it upgraded the version, others actually downgrade it, Does it mean I need to stick with whatever version nx use? I have the habit of updating deps every monday, this is against my workflow :confused:

oh i see, you can keep your version

These migrations are dynamically created? Or do they exists somewhere? I think they do…

each of the packages contain a migrations.json file, which point to specific migrations for different versions

I see, so I can check them :slightly_smiling_face:

I read the migrations docs, it seems you are suppose to create the repo, overtime do several migrations and commit then? Why do I need to keep the migrations.json file if after the migrations and npm i everything is in a stable state.

What am I missing?

some migrate from 1 major version to another

so it’s not a simple migration

I see, so now I commit all these changes and push it, my teammate pull them and just have to run npm i and run the app itself, right? There is no migrations for them.

yup

Thanks a lot

I see that .eslintrc was removed from workspace.json, do we also need the file itself? My guess is yes but maybe no

there should be one for each project and in the workspace

I guess my real question is, can migrations delete files when necessary?

the config property was removed from the workspace.json file

and yes they can

Updated: