Closed ReneMueller4P closed 3 years ago
This seems relevant: https://stackoverflow.com/questions/43230346/error-spawn-npm-enoent
@ReneMueller4P try this when you can, in your project root and if using VS Code, you can open the builder like this:
code node_modules/@nativescript/nx/src/builders/build/builder.js
If not using VS Code, you can manually open that file in your editor. If using 0.0.4 latest of @nativescript/nx on line 92, you can try some of the options mentioned in the stack overflow post. I don't have a windows machine here to test with but lemme know if you find a combo that helps Windows and we can make an adjustment.
The StackOverflow post mentions spawn on npm
however in this case the builder is using spawn with the ns
cli. So something similar may be needed on windows for it to recognize the global {N} cli perhaps?
@NathanWalker I changed according to your suggestion to
const child = childProcess.spawn(/^win/.test(process.platform) ? 'ns.cmd' : 'ns', [nsOptions, { cwd: projectCwd, stdio: 'inherit' }]);
Now I'm not getting an error, but the only feedback that I have is:
Isn't it supposed to load the emulator and run the app? Running on macBook
@ReneMueller4P I resolved the same issue by install nativescript globally and connected my phone to the laptop.
npm install -g nativescript
After you install nativescript, you can try to run: ns doctor ios
to verify if the setup was all correct or follow the the instruction to setup for local builds.
This was fixed by the transient dep on @nativescript/nx from this patch release (doing a workspace clean would pull down latest version and fix the above for windows): https://github.com/NativeScript/nx/releases/tag/1.0.4
Hi, I have a problem when compiling applications I get the following error. on my Windows 10 machine., xplat 12 and npm 7.10
Is there any solution to this ?