Skip to content
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

ERROR with pnpm dlx command #9

Closed
slozano54 opened this issue Aug 25, 2024 · 7 comments
Closed

ERROR with pnpm dlx command #9

slozano54 opened this issue Aug 25, 2024 · 7 comments
Assignees
Labels
bug Something isn't working create-sveltex

Comments

@slozano54
Copy link

Hi !
Thanks for your job.
I actually have difficulty to run the command pnpm dlx create-sveltex
I get an error String.prototype.split called on null or undefined as yo can see on the screenshot.
Selection_481

@ildella
Copy link

ildella commented Aug 27, 2024

Same with npx and yarn dlx

$ npx      create-sveltex
Need to install the following packages:
create-sveltex@0.1.1
Ok to proceed? (y) 

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[ERROR] String.prototype.split called on null or undefined

@nvlang nvlang self-assigned this Aug 29, 2024
@nvlang nvlang added the bug Something isn't working label Aug 29, 2024
@nvlang
Copy link
Owner

nvlang commented Aug 29, 2024

Thanks for the reports! I'll try to further diagnose the issue and resolve it this weekend.

@nvlang
Copy link
Owner

nvlang commented Sep 1, 2024

This issue seems to be a consequence of plopjs/plop#445. As a temporary workaround, as suggested in that issue's comments, I'm hard-coding the 9.3.5 version of inquirer in package.json, which should fix the issue for now. If and when Plop and/or Inquirer fix the root cause, this temporary fix here should be reverted and a newer minimum version of plop should be required in the package.json file.

Thanks again for your reports!

@nvlang nvlang closed this as completed in cfecc15 Sep 1, 2024
@nvlang
Copy link
Owner

nvlang commented Sep 1, 2024

I tested this now and it seems the workaround only works with npx. My guess would be that pnpm dlx and bunx don't enforce the inquirer version lock properly. I haven't tested it with yarn dlx. I'll update the documentation to reflect this.

@slozano54
Copy link
Author

Thanks for your answer.

In fact, i still have the problem with pnpm.
Sélection_506

Actually I can test your project by addind to an existing svelte project and it's great :)

nvlang added a commit that referenced this issue Sep 1, 2024
This commit tries to further hard-code the inquirer version in
package.json by falsely listing it as a direct dependency (instead of as
a peer dependency), in the hopes that this may fix the
`pnpm dlx create-sveltex` and `bunx create-sveltex` commands.

This commit also bumps the create-sveltex version number and updates the
changelog to prepare for publication.

Related issue: #9.
@nvlang
Copy link
Owner

nvlang commented Sep 1, 2024

@slozano54 Thanks for the kind words! I actually just published another update that seems to fix the issue for pnpm dlx and bunx as well (dfb6a10). In my case I had to run pnpm dlx create-sveltex@0.1.3 or bunx create-sveltex@0.1.3 specifically to ensure the right version is run, but for users who don't have an outdated version cached this doesn't seem to be necessary.

@slozano54
Copy link
Author

slozano54 commented Sep 1, 2024

@nvlang Everything works correctly with the command pnpm dlx create-sveltex@0.1.3. I just tried without clearing the cache. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working create-sveltex
Projects
None yet
Development

No branches or pull requests

3 participants