Closed Railly closed 1 year ago
Thank you, I'd appreciate a PR ;)
Just so you're aware @vadimdemedes, it appears that the version uploaded to the npm registry does not have this fix, although the version on Github releases does have it.
This is to say that npm install pastel@latest
does grab v2.0.1, but it is still broken on Windows. Navigating to the node_modules/
folder confirms that the same line in read-commands.js is still there and it is not using node:url
.
@AugusDogus Damn, I forgot the prepare
script, so code wasn't recompiled when publishing. Thanks for reporting, pushing a patch right now.
@AugusDogus Published a 2.0.2.
Hi there First off, thank you for your amazing work, I really enjoy how you approach and adjust the CLI paradigm like Next.js.
Now I've encountered an issue on Windows where Node.js's ESM loader throws an
ERR_UNSUPPORTED_ESM_URL_SCHEME
error when trying to dynamically import a module using an absolute path.This line of code in
read-commands.js
is causing the issue:By using
pathToFileUrl
fromnode:url
worked for me, this should ensure compatibility with Windows without affecting other OS.Note: Could you please confirm if you will be working on that? If not, I can contribute effortlessly.