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

Too many arguments issue on setup without yarn #495

Closed
edenizk opened this issue Jun 7, 2021 · 2 comments
Closed

Too many arguments issue on setup without yarn #495

edenizk opened this issue Jun 7, 2021 · 2 comments
Assignees

Comments

@edenizk
Copy link
Contributor

edenizk commented Jun 7, 2021

I found the problem causing too many arguments, if you will look at my setup without yarn(image 1) and with yarn(image 2) you will see that npx is somehow diving process.argv into nodes whenever there is a space. I was reading that we can either wrap inside another quote(e.g '"SELECT 1"' ), or wrapping between SELECT 1, or with replace 'SELECT 1'.replace(/ /g, '\ ') (not sure if it will work in Macs tho) and this should solve the problem 🙂 .
image (5)
image (6)

But even tho this will solve the problem with the DB setup there will be a problem if the user has space in the folder name like "Test 3" and it will also create another too many arguments problem 😅. You can also find the description in the execa docs

I have the problem with testing that because some of these commands are inside chisel-plugin-wordpress or chisel-scripts, and they are running from node_modules inside the project(which is pulled from npm package page), I couldn't find a way to test them locally. I have tried to test with the jest, but jest doesn't detect too many arguments problem.

@edenizk edenizk self-assigned this Jun 7, 2021
@luboskmetko
Copy link
Member

@edenizk thanks for researching this.

@jakub300 can you advise on this? Seems to be pretty common issue (recently one of our candidates got into that too). Thanks

@jakub300
Copy link
Collaborator

jakub300 commented Nov 21, 2021

This issue is caused by bug in npm (v6 if I remember correctly) on Windows. Issue is not happening after updating npm or using yarn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants