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
pnpx syncpack@alpha lint --show instances --log-levels "error,warn,info,debug"
✗ There was an error when attempting to locate your syncpack rcfile
✗ Please raise an issue at https://github.com/JamieMason/syncpack/issues/new?template=bug_report.yaml
✗ node:internal/modules/cjs/loader:1143
throw err;
^
Error: Cannot find module 'C:UserssteveAppDataLocalpnpm-cachedlxmbimy2fb4rrooqpixzweesu3em94eedae5fb-4ec0
[email protected][email protected]
ode_modulescosmiconfigdistindex.js'
Require stack:
- D:\code\myproject\[eval]
at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
at Module._load (node:internal/modules/cjs/loader:981:27)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at [eval]:2:9
at runScriptInThisContext (node:internal/vm:143:10)
at node:internal/process/execution:100:14
at [eval]-wrapper:6:24
at runScript (node:internal/process/execution:83:62)
at evalScript (node:internal/process/execution:114:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'D:\\code\\myproject\\[eval]' ]
}
Node.js v18.20.2
The behavior is the same both with or without a syncpackrc file.
Contents of syncpack configuration file
{"dependencyTypes": ["dev","prod"]}
Optional comments
I suspect there's something related to windows path using \ as path separators:
In the stack trace, folder structure is concatenated
I tested using wsl in the same project, and it works as expected / is used for path separator.
Not sure how syncpack works internally, but you may consider normalizing path to use / and not \ even on windows. These are valid path in windows, though not the default form.
Syncpack version
[email protected]
Operating system(s)
Windows
Steps to reproduce
Under windows, in any node project run:
or
Expected behavior
Should works
Actual behavior
Both failed with this error:
The behavior is the same both with or without a syncpackrc file.
Contents of syncpack configuration file
Optional comments
I suspect there's something related to windows path using
\
as path separators:/
is used for path separator.Not sure how syncpack works internally, but you may consider normalizing path to use / and not \ even on windows. These are valid path in windows, though not the default form.
Code of Conduct
The text was updated successfully, but these errors were encountered: