xpack / vscode-xpack-extension-ts

A Visual Studio Code C/C++ managed build extension
https://xpack.github.io/vscode/
MIT License
9 stars 0 forks source link

ESM error during a quick start a Hello World project initialization #43

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi all,

After the VS Code xPack installation, I attempted to follow the documentation to execute a quick start. But during the first step an error occurs:

Executing task: xpm init --template @xpack/hello-world-template@latest --property language=cpp 

Checking package @xpack/hello-world-template@latest metadata...
Processing @xpack/hello-world-template@0.6.0...
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 'c:'
    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 Init.doInitWithTemplate (file:///C:/Users/lienv/AppData/Roaming/npm/node_modules/xpm/lib/xpm/init.js:288:33)

I have no idea why this error occured, can you help me?

Configuration:

ghost commented 1 year ago

Fixed with XPM 0.15.1

ilg-ul commented 1 year ago

Thank you for confirming.

BTW, there is an xpm 0.15.2 now.

ghost commented 1 year ago

Thank you for your job !