Migration Script Error
Migration Script Error on Windows Running the migration script on Windows is returning an error, possibly a Node JS error.
To Reproduce Steps to reproduce the behavior:
- Install latest CMS Design System from NPM
- In the console run the following command:
npx cmsds-migrate - Select:
react button-migration - See error
Error
!! Error: inquireForFile: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader.
On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Expected behavior Help migrating the old Design System Buttons to the latest using 6.0+ of the Design System.
Windows laptop
- Windows v10
- Node v18.12.0
Thanks for reporting this, @toddbrady. We're looking into this problem. It looks like Node expects a special prefix when importing ES modules by absolute paths on Windows because it doesn't quite understand roots like C:/. It wasn't something we tested for. If this is really time-sensitive and you have access to a UNIX machine, I suggest running it on that.
Hey @toddbrady, are you able to run this in the WSL? We don't test or run any of our system in a windows environment.
@forrestbaer Unfortunately not. The machine I have is fairly locked down. Outside of being able to run Git Bash, I don't have access to Linux.
Bummer! Well since we don't have a windows environment to test in I'm hesitant to try to change something locally and hope it works for you. I will see about getting a windows license I can perhaps run in a VM, but in the meantime, if you'd like to work on this together I'd be happy to pair with you on your machine to adjust some things to see if we can get it working. You can PM me in slack user: BTZ8
Another option if you feel up to it would be to see if you can resolve the issue locally and submit a fix. The script and it's helpers are located in your node_modules/@cmgov/design-system@version/scripts/cmsds-migrate folder.
Sure thing. Let me see what I can do in the next day or two. I'll see if I can modify the script directly in the npm package, and see what happens.
Closing issue. This appears to have been resolved in #2099