-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The -c --extra-options-file flag isn't working #567
Comments
Try renaming it to .mjs to see if that works? |
Also try |
I'm still getting the same message npx peggy -c .\config.mjs
Error importing config ".\config.mjs"
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' npx peggy -c ./config.mjs
Error importing config "./config.mjs"
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' npx peggy -c ./config.js
Error importing config "./config.js"
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' |
Nod. I'll look into this tomorrow. |
Can you turn on "--verbose" command line flag, and post the results here? Be sure to mask out any personal information! |
Sorry for taking so long to respond, I was a bit busy. This is the output I receive: npx --verbose peggy -c .\config.js
npm verbose cli C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\nvm\v22.5.1\node_modules\npm\bin\npm-cli.js
npm info using npm@10.8.2
npm info using node@v22.5.1
npm verbose title npm exec peggy -c .\config.js
npm verbose argv "exec" "--loglevel" "verbose" "--" "peggy" "-c" ".\\config.js"
npm verbose logfile logs-max:10 dir:C:\Users\user\AppData\Local\npm-cache\_logs\2024-10-17T07_32_07_041Z-
npm verbose logfile C:\Users\user\AppData\Local\npm-cache\_logs\2024-10-17T07_32_07_041Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/peggy 392ms (cache revalidated)
Error importing config ".\config.js"
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
npm verbose cwd C:\Users\user\OneDrive\Documents\class12
npm verbose os Windows_NT 10.0.22631
npm verbose node v22.5.1
npm verbose npm v10.8.2
npm verbose exit 1
npm verbose code 1 npx peggy --verbose -c .\config.js
Error importing config ".\config.js"
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' |
@damianpeaf can you please try #569 to see if it works for you? |
I had the same issue and #569 seems to be working well for me. |
@gzp79 thanks for testing. I'll get this merged and released in the next day or so. |
Fixes #567. Use file: URLs to import ES6.
In release v4.2.0 |
I was using the command with version 4.0.3, and it worked correctly.
npx peggy -c .\config.js
But now that I try to use it with version 4.1.1, I get the following error message:
Error importing config ".\config.js"
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
I'm not sure if this issue is directly related to Peggy or something in Node.
Node version: 22.5.1
OS: Windows 11
The text was updated successfully, but these errors were encountered: