site name: trevor4n-sutton.netlify.app site link
Build + Serverless Function netlify.toml package.json
Any help would be appreciated! Serverless stuff is super new to me
The error is right at the start…
npm ERR! Missing script: “build”
npm ERR! To see a list of scripts, run:
npm ERR! npm run
If you look in your
package.json you can see:
"test": "echo \"Error: no test specified\" && exit 1"
There is no
build script specified there.
The only script is
test and it’s just the default one.
If you’re going to run
npm run build from Netlify, then specify your actual build command in the
"build": "YOUR BUILD COMMAND HERE"
Hiya, sorry you are having trouble with your build.
This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem Additionally, this Support Guide houses all of our resources for debugging build and deploy issues.
In order to satisfy the:
- netlify.toml’s usage for declaring the serverless function directory
- package.json’s unnecessary build command for simple single-page webapps that aren’t being webpacked etc…
I set my package.json > scripts >
"build": "echo \"setting env to prod \" & cross-env NODE_ENV=production &",
Looks like you’ve fixed the issue @trevor4n?