Closed jinto-ag closed 5 days ago
The same thing
> npx @sly-cli/sly add
node:internal/modules/run_main:129
triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\...\OneDrive\Рабочий' imported from C:\Users\...\OneDrive\Рабочий стол\PetProjects\shopco\
at finalizeResolution (node:internal/modules/esm/resolve:265:11)
at moduleResolve (node:internal/modules/esm/resolve:933:10)
at defaultResolve (node:internal/modules/esm/resolve:1157:11)
at nextResolve (node:internal/modules/esm/hooks:866:28)
at Hooks.resolve (node:internal/modules/esm/hooks:304:30)
at MessagePort.handleMessage (node:internal/modules/esm/worker:196:24)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)
at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///C:/Users/%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B5%D0%B9/OneDrive/%D0%A0%D0%B0%D0%B1%D0%BE%D1%87%D0%B8%D0%B9'
}
Node.js v20.15.0
With pnpm
> pnpm dlx @sly-cli/sly add
error: unknown command 'стол\PetProjects\shopco'
* Terminal will be reused by tasks, press any key to close it.
Perhaps the problem is due to the fact that in English the desktop is like one word, and in Cyrillic as 2 words - "Рабочий стол". Because of this, the problem is in the paths
There is still a guess as to why this is happening. Because of the user name windows written in Cyrillic. I switched to a laptop and everything works
Hey, sorry about this – I don't have access to a Windows machine to debug. I've gone over everywhere that I'm importing a dynamic path and it's using the getFileURLToPath which is meant to be cross platform (even includes an example of filename with spaces)
I made a couple tweaks to the shell spawning in 1.14.0, hopefully that helps here
I made a couple tweaks to the shell spawning in 1.14.0, hopefully that helps here
Unfortunately, I have other equipment right now that doesn't have this problem and I can't test. Only in about a week I will be able to answer and tell you. Did you get the fix
I made a couple tweaks to the shell spawning in 1.14.0, hopefully that helps here
Even on version 1.13.0
Updated to version 1.14 and it still works
@jacobparis thank you for the response. I finally figured out that the space in the folder name caused the issue. The issue has been resolved.
Title:
Module Not Found Error in Sly
Description:
When running the
npx sly add
command, I encountered aModule Not Found
error. The error message suggests that the module 'C:\Users\Software' could not be found. This issue occurred on a Windows machine.Steps to Reproduce:
npx sly add
.Expected Behavior:
The command should execute without any errors.
Actual Behavior:
The command fails with the following error:
Environment:
Additional Context:
This issue seems to be related to the handling of file paths on Windows, particularly those with spaces. The error message suggests that the path is being cut off at the first space ('C:\Users\Software'), which might be causing the issue.