Closed mateussaggin closed 1 year ago
https://stackoverflow.com/questions/77358249/error-cannot-find-module-when-path-contains-spaces-on-windows-in-node-js I get the same error on Windows
Would you like to create a PR for this issue?
I'm not familiar enough with the NestJS source to be sure that this is the cause, but when I looked for all the changes between 10.1.18 and 10.2.0, I found this:
const sourceMapsRegisterPath = this.getSourceMapSupportPkg();
if (sourceMapsRegisterPath !== undefined) {
processArgs.unshift(`-r ${sourceMapsRegisterPath}`);
}
It seems to me that the lack of quotes around sourceMapsRegisterPath
is the issue here.
Let's track this here https://github.com/nestjs/nest-cli/pull/2359
Is there an existing issue for this?
Current behavior
Running
nest start
on a folder that the full path has a space throws module not found error. You can use the starter to test that behavior.Minimum reproduction code
https://github.com/nestjs/typescript-starter
Steps to reproduce
mkdir /Users/My\ Test
nest new test
Expected behavior
We should be able to run projects that the full path has spaces.
Package version
10.2.0
NestJS version
10.2.7
Node.js version
20.9.0
In which operating systems have you tested?
Other
No response