I am upgrading my nodejs version from 8 to 10. after upgraded, i can't run my application in any browsers right now. so i've been googled my issue and found out that header size of node 10 has been downsized to 8kb from 80kb. my application header size is over 8kb. so i need to set it with nodejs command --max-http-header-size=80000
. but i don't know how to set it up with nodemon
and babel-node
.
Please help.
here is my nodemon.json
{
"ext": "js jsx ejs json gql css",
"exec": "babel-node"
}
and here is my current package.json:
"develop:server": "BABEL_ENV=server nodemon .",
The Solution i've already tried:
{
"ext": "js jsx ejs json gql css",
"exec": "node --max-http-header-size=80000 ./node_modules/babel-cli/bin/babel-node.js"
}
The right solution is below ( choose one of them ):
{ "ext": "js jsx ejs json gql css", "exec": "NODE_OPTIONS=--max-http-header-size=80000 babel-node" }
"develop:server": "NODE_OPTIONS=--max-http-header-size=80000 BABEL_ENV=server nodemon .",