winchesHe / wes-utils-monorepo

a utils monorepo
3 stars 0 forks source link

in windows, ghost scan has error #1

Open agrozyme opened 1 year ago

agrozyme commented 1 year ago

Package: @winches/ghost Node: v18.15.0

When I run ghost scan ., it has an error, but result is OK.

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'
    at new NodeError (node:internal/errors:399:5)
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)
    at defaultResolve (node:internal/modules/esm/resolve:1135:3)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ESMLoader.import (node:internal/modules/esm/loader:525:22)
    at importModuleDynamically (node:internal/modules/esm/translators:110:35)
    at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
    at K (file:///D:/Global/node/pnpm-global/5/.pnpm/@winches+ghost@1.1.9_vue@3.2.47/node_modules/@winches/ghost/dist/bin.js:3:1533) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
winchesHe commented 1 year ago

thx~,this PR maybe can solve this Errir https://github.com/winchesHe/wes-utils-monorepo/pull/2

agrozyme commented 1 year ago

It has same error in @winches/ghost 1.2.0 I use pnpm for package manager, but use npm also has same error.

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'
    at new NodeError (node:internal/errors:399:5)
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)
    at defaultResolve (node:internal/modules/esm/resolve:1135:3)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ESMLoader.import (node:internal/modules/esm/loader:525:22)
    at importModuleDynamically (node:internal/modules/esm/translators:110:35)
    at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
    at K (file:///D:/Global/node/pnpm-global/5/.pnpm/@winches+ghost@1.2.0_vue@3.2.47/node_modules/@winches/ghost/dist/bin.js:3:1533) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
winchesHe commented 1 year ago

It has same error in @winches/ghost 1.2.0 I use pnpm for package manager, but use npm also has same error.

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'
    at new NodeError (node:internal/errors:399:5)
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)
    at defaultResolve (node:internal/modules/esm/resolve:1135:3)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ESMLoader.import (node:internal/modules/esm/loader:525:22)
    at importModuleDynamically (node:internal/modules/esm/translators:110:35)
    at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
    at K (file:///D:/Global/node/pnpm-global/5/.pnpm/@winches+ghost@1.2.0_vue@3.2.47/node_modules/@winches/ghost/dist/bin.js:3:1533) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

Sry, I don't have a Windows system machine to do more testing,anyway,the result is righting,I will try to fix it in future iterations