Open alamhubb opened 3 years ago
You are still using CommonJS exports module.exports = {}
. you should probably switch over to export default {}
This is still happening in 5.0.0-rc.1
(at least on windows).
This problem is also being talked about on Stack Overflow and someone points out the bug in vue-cli
:
https://stackoverflow.com/questions/69665780/error-err-unsupported-esm-url-scheme-only-file-and-data-urls-are-supported-by
Hello from 2023. Can a committer please fix this issue?
i use esmodule in vue.config.js
Version
5.0.0-beta.2
code
Reproduction link
https://none
Environment info
Steps to reproduce
none
What is expected?
none
What is actually happening?
ERROR Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// U RLs. Received protocol 'd:' Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Rec eived protocol 'd:' at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:782:11) at Loader.resolve (internal/modules/esm/loader.js:86:40) at Loader.getModuleJob (internal/modules/esm/loader.js:230:28) at Loader.import (internal/modules/esm/loader.js:165:28) at importModuleDynamically (internal/modules/cjs/loader.js:1006:27) at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:30:14) at loadFileConfig (D:\project\yoyosys\console\console-2.0-installer\console-install-ui\node_modules\@vue\cli-service\lib\util\loadFileConfig.js:28:7) at Service.loadUserOptions (D:\project\yoyosys\console\console-2.0-installer\console-install-ui\node_modules\@vue\cli-service\lib\Service.js:337:44) at Service.init (D:\project\yoyosys\console\console-2.0-installer\console-install-ui\node_modules\@vue\cli-service\lib\Service.js:76:30) at Service.run (D:\project\yoyosys\console\console-2.0-installer\console-install-ui\node_modules\@vue\cli-service\lib\Service.js:245:16) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! console-install@0.1.0 serve:
vue-cli-service serve
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the console-install@0.1.0 serve script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2021-07-19T10_27_48_845Z-debug.log
Process finished with exit code 1
none