You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the npm create command specified in the guide triggers an error while parsing the given URL.
Steps to reproduce
Run the npm create command on a Macbook (M2) running Sonoma 14.0.
At the prompt to add your website's URL add any URL, any text, or nothing.
See error:
$ npm create indiekit indiekit.byjp.me
Welcome to Indiekit! (create-indiekit v1.0.0-beta.6)
If you encounter a problem, visit https://github.com/getindiekit/indiekit/issues to file a new issue.
> Gathering details…
? What is your website’s URL? › https://www.byjp.me
file:///Users/jp/.npm/_npx/5afa545f499565d0/node_modules/create-indiekit/lib/setup-prompts.js:8
URL.canParse(value)
^
TypeError: URL.canParse is not a function
at TextPrompt.validate [as validator] (file:///Users/jp/.npm/_npx/5afa545f499565d0/node_modules/create-indiekit/lib/setup-prompts.js:8:11)
at TextPrompt.validate (/Users/jp/.npm/_npx/5afa545f499565d0/node_modules/prompts/lib/elements/text.js:73:28)
at TextPrompt.submit (/Users/jp/.npm/_npx/5afa545f499565d0/node_modules/prompts/lib/elements/text.js:85:16)
at ReadStream.keypress (/Users/jp/.npm/_npx/5afa545f499565d0/node_modules/prompts/lib/elements/prompt.js:32:16)
at ReadStream.emit (node:events:513:28)
at emitKeys (node:internal/readline/utils:357:14)
at emitKeys.next (<anonymous>)
at ReadStream.onData (node:internal/readline/emitKeypressEvents:61:36)
at ReadStream.emit (node:events:525:35)
at addChunk (node:internal/streams/readable:315:12)
npm ERR! code 1
npm ERR! path /Users/jp/src/personal
npm ERR!command failed
npm ERR!command sh -c -- create-indiekit indiekit.byjp.me
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jp/.npm/_logs/2023-12-10T12_54_46_246Z-debug-0.log
Expected behaviour
It should set up a new indiekit instance.
Environment
IndieKit 1.0.0-beta6
macOS 14.0 (Sonoma)
Macbook M2
Additional context
Pressing Ctrl-C (instead of entering a URL) results in a semi-successful run of the create script (the publication key in package.json is empty, and text in the readme & description in package.json refer to the side "undefined")
The text was updated successfully, but these errors were encountered:
URL.canParse() is available in all Node versions after 18.17.0, so this error shouldn’t return if you have Node 18.17.0 or above installed. Do you know which version you had installed when you got this error?
I note that the docs say Node v20 is the minimum supported version, but the version check in the create-indiekit package currency only warns you if v16 or below is installed. I’ll update that, which hopefully means this error won’t be shown.
Hi @paulrobertlloyd, this is exactly the issue — I have multiple versions of node on my machine and this was using v16.19.0! Thanks for the explanation — I think the dependency check change is a great idea too! 🙇
All is working now 😊 Thanks for the help (and feel free to close this issue as/when that suits!)
paulrobertlloyd
changed the title
npm create indiekit fails at "URL.canParse(value)"
npm create indiekit fails at URL.canParse(value)Jan 4, 2024
Description of the bug
Running the
npm create
command specified in the guide triggers an error while parsing the given URL.Steps to reproduce
npm create
command on a Macbook (M2) running Sonoma 14.0.Expected behaviour
It should set up a new indiekit instance.
Environment
Additional context
Pressing
Ctrl-C
(instead of entering a URL) results in a semi-successful run of the create script (thepublication
key inpackage.json
is empty, and text in the readme & description inpackage.json
refer to the side "undefined")The text was updated successfully, but these errors were encountered: