Open
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
Executing a script inside a path that has a UTF-8 character fails with error MODULE_NOT_FOUND.
PS C:\Users\Sébastien Labine\Documents\Github\smartbills\apps\mobile> yarn start
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'C:\Users\S├®bastien Labine\Documents\Github\smartbills\apps\mobile\node_modules\expo\bin\cli.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
As soon as I move my project to the C:/, everything works fine.
PS C:\smartbills> yarn start
To reproduce
- Create a yarn project on a windows computer with UTF-8 characters in the username.
- Add any command as script that requires a node_modules to work for instance expo.
expo init my-app
- try to execute yarn start, it will fail.
- move folder to c:/
- try to execute yarn start, it will work.
Environment
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
Binaries:
Node: 16.13.2 - C:\Users\SBASTI~1\AppData\Local\Temp\xfs-2c9bae2e\node.CMD
npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
Additional context
Multiple other bug report like #3725 reported the same issue