Deploying file to server

Hi there,
I’m trying to deploy a file to moralis but i get this error:
En error occured when trying to deploy
Error [ERR_FR_MAX_BODY_LENGTH_EXCEEDED]: Request body larger than maxBodyLength limit

Looking at my file size i can see that the node_modules is a big file (80 MB), and it’s the reason I cant upload. Is there a way to upload my file without the node_modules in it?

Need Help very important and as soon as possible

Where you try to upload? database, static hosting, ipfs?

You may not be able to upload 80MB

How is that you need to upload 80MB in size?

i have the same issue trying to deploy my nft marketplace boilerplate to moralis server.my node module is also too big,i dont know if there are specific ones i need so i can delete the rest.
the whole files gets over the required size,when i do yarn build to get a smaller file to upload,i find out that only the homepage is reloadable,every other page goes to 404 error when hyou try to reload,and the mobile view is bigger and doesnt fit properly to phone screens
please help

You have to upload only the build folder, not the entire development folder

i try to upload only the build folder,but the other pages are not reloadable.
only the homepage is reloadable
for instanmce,if i click on transaction page,on getting to transaction page,if i hit reload,it goes straight to 404 error.
then the mobile view isnt good,its bigger than a phone screen.

Only the folder resulting from building the project, not the entire project folder

i try to upload only the build folder,but the other pages are not reloadable.
only the homepage is reloadable
for instanmce,if i click on transaction page,on getting to transaction page,if i hit reload,it goes straight to 404 error.
then the mobile view isnt good,its bigger than a phone screen.

Also(unrelated)…visitors cant view nft in the marketplace unless they add a wallet as extension to the browser and authenticate…firstly,i felt for the purpose of mobile users,a user should be able to authenticate even if the wallet isnt attached as extension to the browser(cos that isnt possible from a mobile phone) then how can visitors who havent connected their wallets see the nft on the marketplace…like opensea

The problem with that 404 error we can not solve it now. It is from how react uses redirections. And our hosting is only a static hosting now. You could use a different hosting if you want to get that problem fixed now.

alright
how about the authentication,how can i make it possible for authentication to be done from walllets not on browser extension,like metamask app itself.
and how can i make the nft in the marketplace public for non authenticated users.

Hi thank you for responding,

It’s not that i need to upload a big file, my actual project it’s a small project, what makes it big is the node_modules forlder inside my project that was created when I’ve run npm install -g moralis-admin-cli

If I try to move that forlder out of my project when I run moralis-admin-cli deploy I get this error:

Volta error: Could not locate executable moralis-admin-cli in your project.

Please ensure that all project dependencies are installed with npm install or yarn install

You need to get the user eth address somehow. After you get the address you can get the list of nfts by using web3api. Usually wallet connect is used on mobile.

Could you help me too with this annoying problem?

You don’t need to upload the node modules folder. Only the build folder

Yes but how do I do that if when I take the node folder out of the project I get that error

You don’t have to move out that folder, you only have to specify to upload a sub folder from that folder for upload

would you mind to tell me how do I do that?

and also thank you for your help

Check the parameters for the cli. You should be able to upload any folder.

I’m sorry I’m kind of a noobie, and I don’t know if I really understand what you mean. Let’s say that in my working directory I’ve 2 folders the node_modules and the project (were all my code is). how do I tun the command moralis-admin-cli deploy without including the node_modules in the deployment?

You move to the directory that you want to upload and then you run the command from that directory. Or maybe you can give the absolute path to a directory as parameter.