nrwl / add-nx

22 stars 8 forks source link

npx cra-to-nx setup bug #33

Open Digital-Coder opened 2 years ago

Digital-Coder commented 2 years ago

By running npx cra-to-nx on stock CRA I get

The syntax of the command is incorrect. Error: Command failed: mkdir -p tools/scripts

at Object.addPostinstallPatch (C:\Users\AppData\Local\npm-cache\_npx\2fef4a1ad32917df\node_modules\cra-to-nx\src\lib\add-postinstall-patch.js:7:21)

mandarini commented 2 years ago

Hi there! Version 2.1 is coming up soon and this will most probably be fixed. Which version of CRA are you using?

Digital-Coder commented 2 years ago

Hi there! Version 2.1 is coming up soon and this will most probably be fixed. Which version of CRA are you using?

Hi !, I tried with 5.0.0

mandarini commented 2 years ago

Nice, ok. Seems to work for me with the new version we have coming up, so once it's published, and it works for you too, I'll close this issue!

mandarini commented 2 years ago

Ok, 2.1 published @Digital-Coder ! Can you try if it fixes your issue?

Digital-Coder commented 2 years ago

It fixed previous issue :rocket:

there is one more. After running nx build I get : 'BUILD_PATH' is not recognized as an internal or external command, Which is in apps/my-app package.json file

mandarini commented 2 years ago

Can you share your repo so that I can take a quick look? Also, can you please try running the nx commands with npx?

eg. npx nx build

Digital-Coder commented 2 years ago

https://github.com/Digital-Coder/cra-to-nx-test/commits/master you can check add nx to cra@5.0 commit in which npx nx build is not working and I fixed it in add build path to craco config commit ,but you will need to fix it for each created project.