NPM prebuild script is being skipped

I have a prebuild script node ./src/lib/generate-api-doc.js.
npm run dev is working and the site is building, but when I push to Netlify, it’s not reading the script at all. I am using 11ty.

https://app.netlify.com/sites/nylasdocs/deploys/6050dc0971e84de70e727161

It’s publishing 101 files when it should be over 300 at this point. Not sure what to provide since it’s not even failing, it’s just skipping the script.

"prebuild": "node ./src/lib/generate-api-doc.js",

I also tried:

"prebuild": "node src/lib/generate-api-doc.js",

The issue is that the site was still using the eleventy build script. I changed it to npm run build and the site builds on Netlify without issues.

Hi @tjperry07 :wave:

Thank you so much for circling back and sharing your solution with us! It is always beneficial for folks who encounter similar situations, so we really appreciate it :slight_smile: