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

Not enough non-option arguments: got 0, need at least 1 #173

Closed
openainext opened this issue Dec 22, 2020 · 4 comments
Closed

Not enough non-option arguments: got 0, need at least 1 #173

openainext opened this issue Dec 22, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@openainext
Copy link

npx @getmeli/cli upload --url http://localhost:3030 --site aa27db77-c0e0-44a4-ac21-6d52934f7c60
--token aa1d1dcec5537f707d13953ea740ec2a724224ac6554076e6005252cb3610bc5 --branch master .
npx: installed 86 in 44.842s

@gempain
Copy link
Contributor

gempain commented Dec 22, 2020

@wanglong167 hi ! You can fix this by making sure the --branch option is not the last one. This is a known issue which I am looking into.

Try this:

npx @getmeli/cli upload \
  --url http://localhost:3030 \
  --site aa27db77-c0e0-44a4-ac21-6d52934f7c60 \
  --branch master \
  --token aa1d1dcec5537f707d13953ea740ec2a724224ac6554076e6005252cb3610bc5 \
  .

@gempain gempain added the bug Something isn't working label Dec 22, 2020
@openainext
Copy link
Author

{
"errorObject": {
"message": "Request body larger than maxBodyLength limit",
"name": "Error [ERR_FR_MAX_BODY_LENGTH_EXCEEDED]",
"stack": "Error [ERR_FR_MAX_BODY_LENGTH_EXCEEDED]: Request body larger than maxBodyLength limit\n at RedirectableRequest.write (E:\tmp\npm-cache\_npx\3732\node_modules\@getmeli\cli\node_modules\follow-redirects\index.js:96:24)\n at FormData.ondata (internal/streams/legacy.js:17:31)\n at FormData.emit (events.js:196:13)\n at FormData.CombinedStream.write (E:\tmp\npm-cache\_npx\3732\node_modules\@getmeli\cli\node_modules\combined-stream\lib\combined_stream.js:138:8)\n at DelayedStream.ondata (internal/streams/legacy.js:17:31)\n at DelayedStream.emit (events.js:196:13)\n at DelayedStream._handleEmit (E:\tmp\npm-cache\_npx\3732\node_modules\@getmeli\cli\node_modules\delayed-stream\lib\delayed_stream.js:82:15)\n at ReadStream.source.emit (E:\tmp\npm-cache\_npx\3732\node_modules\@getmeli\cli\node_modules\delayed-stream\lib\delayed_stream.js:29:19)\n at addChunk (_stream_readable.js:290:12)\n at readableAddChunk (_stream_readable.js:271:11)\nError: Thrown at:\n at data (E:\tmp\npm-cache\_npx\3732\node_modules\@getmeli\cli\src\commons\axios\ensure-stack-trace.ts:7:36)\n at Object.url [as uploadArchive] (E:\tmp\npm-cache\_npx\3732\node_modules\@getmeli\cli\src\commands\upload\upload-archive.ts:37:11)\n at Object.t.upload (E:\tmp\npm-cache\_npx\3732\node_modules\@getmeli\cli\src\commands\upload\upload.ts:17:47)",

@gempain change maxBodyLength configuration https://github.com/expressjs/multer#limits

@gempain
Copy link
Contributor

gempain commented Dec 22, 2020

@wanglong167 I see you have succeeded in using the CLI. I will close this issue and open a new one for add an environment variable to configure multer's body max length.

@gempain
Copy link
Contributor

gempain commented Dec 23, 2020

@wanglong167 the maxBodyLength issue wasn't coming from multer, but from axios being used in the CLI. I pushed a fix today so you should be good to go. I also released v1.0.0-beta.8 which allows you to configure Multer limits, but by default all of them are set to Infinity so you shouldn't have to change anything there.

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

No branches or pull requests

2 participants