You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I have encountered a strange problem and would like to ask for your help.
I have a project on an SMB volume (both the volume host and the mount end are Windows), in which some modules depend on others, so after using npm i to install the dependencies, there will be some directory links.
When I run my node program, some linked modules cannot be loaded and report the following error: Error: EINVAL: invalid argument, readlink '/path/to/module', but this path dose exist and is accessible. I can navigate to the module directory by explorer.exe. After I access it from explorer, I start my program again, and at this time, the program can load this module normally, but the same situation will occur with other linked modules afterwards (just some of the linked modules). I can repeat the above steps until all modules are loaded by not modifying anything.
I'm not sure if this is a bug in the fs module or Windows, I have not encountered similar errors caused by SMB directory links in other programs before. I hope someone can help me analyze this strange phenomenon.
Minimal Reproduction
No response
Output
Error: EINVAL: invalid argument, readlink '/path/to/module'
at Object.realpathSync (node:fs:2754:30)
at toRealPath (node:internal/modules/helpers:58:13)
at tryFile (node:internal/modules/cjs/loader:521:10)
at tryPackage (node:internal/modules/cjs/loader:480:16)
at Module._findPath (node:internal/modules/cjs/loader:771:18)
at Module._resolveFilename (node:internal/modules/cjs/loader:1211:27)
at Module._load (node:internal/modules/cjs/loader:1051:27)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/path/to/project file) {
errno: -4071,
code: 'EINVAL',
syscall: 'readlink',
path: '/path/to/project file'
}
Before You Submit
I have looked for issues that already exist before submitting this
Node.js Version
v20.17.0
NPM Version
v9.8.1
Operating System
Windows 11 23H2
Subsystem
fs
Description
Hello everyone, I have encountered a strange problem and would like to ask for your help.
I have a project on an SMB volume (both the volume host and the mount end are Windows), in which some modules depend on others, so after using
npm i
to install the dependencies, there will be some directory links.When I run my node program, some linked modules cannot be loaded and report the following error:
Error: EINVAL: invalid argument, readlink '/path/to/module'
, but this path dose exist and is accessible. I can navigate to the module directory by explorer.exe. After I access it from explorer, I start my program again, and at this time, the program can load this module normally, but the same situation will occur with other linked modules afterwards (just some of the linked modules). I can repeat the above steps until all modules are loaded by not modifying anything.I'm not sure if this is a bug in the fs module or Windows, I have not encountered similar errors caused by SMB directory links in other programs before. I hope someone can help me analyze this strange phenomenon.
Minimal Reproduction
No response
Output
Before You Submit
The text was updated successfully, but these errors were encountered: