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

An unexpected error occurred in provider deploy: Error: File size limit exceeded #992

Closed
stereobooster opened this issue Nov 17, 2017 · 14 comments

Comments

@stereobooster
Copy link

> Deploying ~/my/an-almost-static-stack/build under stereobooster
> Error! Upload failed
> Error! An unexpected error occurred in provider deploy: Error: File size limit exceeded
    at responseError (/snapshot/now-cli/dist/now.js:193:15)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

total size of build dir 3 209 517 bytes (3,3 MB on disk)

Source code https://github.com/stereobooster/an-almost-static-stack/tree/now

@jake
Copy link

jake commented Nov 18, 2017

getting this too! just signed up for now, not sure if I'm doing something wrong. build folder is 4.5mb.

aha, I see in the pricing list that on the free tier the max file size is 1MB. perhaps the error message could be more descriptive: show which file triggered the error, and show the limit for your current plan? might be common for a first time user to have an existing app with a large file.

@enjine
Copy link

enjine commented Nov 21, 2017

i have a paid Premium plan and i'm still getting the same error.

> Error! Upload failed
> Error! An unexpected error occurred in provider deploy: Error: File size limit exceeded
    at responseError (/snapshot/now-cli/dist/now.js:193:15)
    at process._tickCallback (internal/process/next_tick.js:109:7)

@rauchg
Copy link
Member

rauchg commented Nov 21, 2017

@enjine we're taking a look!

@darasus
Copy link

darasus commented Nov 26, 2017

Same issue, I switched to premium and get the same error.

Fixed: Seems like the error occurs only when you try to deploy the project on free tier (doesn't work since you exceed the limit) then upgrade and then deploy again. Just start over, create a new project.

Nope, still have this issue.

@OlliV
Copy link
Contributor

OlliV commented Nov 26, 2017

Hi,

I can't reproduce the issue. Can you run now with -d flag and paste the relevant output.

now -d

@stereobooster
Copy link
Author

with now -d I was able to find that the issue was in .map files, which are generated by c-r-a by default. Removed and 👌, but this case can be handled in more friendly way.

@rauchg
Copy link
Member

rauchg commented Nov 26, 2017

#1010

@rauchg rauchg closed this as completed Nov 26, 2017
@rauchg
Copy link
Member

rauchg commented Nov 26, 2017

Thank you @stereobooster for the suggestion. We'll improve the error message!

@mcintyre94
Copy link

It'd be really nice to have this improved: Wes Bos mentions Now as the first deployment scenario in his reactforbeginners.com course, but before that he shows the npm run build command, which - since we're using CRA, creates a pretty large JS map file. We then get this error message when trying to deploy, which I thought initially meant I'd have to eject from CRA to stop the map building, but actually just deleting that file was fine and that wasn't at all obvious from the error.

@andrewowen
Copy link

@mcintyre94 have you figured out how to fix this? deleting the map file now makes the deployment fail if trying to do it from inside the build dir. Are you just not doing it from inside the build dir?

@mcintyre94
Copy link

I just deleted the map file and it worked - it's presumably because the map file is too large for the free tier.

@floustao
Copy link

For those wondering how to remove the map files :
You just have to modify the package.json :
"build": "react-scripts build && rm build/static/js/*.map"

@stereobooster
Copy link
Author

"build": "GENERATE_SOURCEMAP=false react-scripts build"

or set it through .env

@chinchang
Copy link

I get this error randomly anytime. Then I switch to another terminal window and then run now to fix the error! 😞

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

10 participants