Menu

Two of our sixteen npm scripts call files that are not in the repository, and one of them has been broken since the day it was written
📰

Two of our sixteen npm scripts call files that are not in the repository, and one of them has been broken since the day it was written

DEV Community: nextjs·Daniel Pertu·3 days ago
#OvdaESck
#devtonextjs#devto#dev#stripe#file
Reading 0:00
15s threshold

package.json is the one file in a project that nobody audits, because every line in it has been run at least once by somebody. I went through all sixteen scripts in ours and sorted them by what they actually touch. Two of them cannot run at all, and the broken pair turned out to be the oldest thing in the file.

The sixteen

"test" : "vitest run" , "dev" : "next dev" , "build" : "next build" , "start" : "next start" , "lint" : "next lint" , "db:generate" : "drizzle-kit generate" , "db:migrate" : "drizzle-kit migrate" , "db:push" : "drizzle-kit push" , "db:studio" : "drizzle-kit studio" , "format" : "prettier --write ." , "format:check" : "prettier --check ." , "stripe:setup" : "tsx --env-file=.env stripeSetup.ts" , "stripe:seed" : "tsx --env-file=.env.local stripeSeed.ts" , "stripe:listen" : "stripe listen --forward-to localhost:3000/api/webhook/stripe" , "db:seed" : "tsx --env-file=.env.local utils/db/seed.ts" , "indexnow" : "tsx --env-file=.env.local scripts/indexnow.ts"

Enter fullscreen mode

Exit…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.