My project has been working fine untill I made a pull from the backend dev branch (I’m not involved directly with it) which I integrate with the frontend. I noticed some changes to the package.json file and I ran npm install
to update the file and since then I’ve be getting the error: ‘node-pre-gyp’ is not recognized as an internal or external command
I tried running the project using npm run dev
and I was getting; ‘ts-node-dev’ is not recognized as an internal or external command. None of the scripts seem to be working anymore.
I tried deleting node_modules and installing again but that didn’t work. I deleted the whole project and recloned it, still same but other backend projects are working fine.
"name": "mykrogrid-api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"engines": {
"node": ">=20"
},
"scripts": {
"dev": "ts-node-dev -r tsconfig-paths/register ./index.ts",
"start": "node ./dist/index.js",
"build": "npm install && tsc && tsc-alias && npm run copy-assets",
"postinstall": "npm run generate --schema ./prisma/schema.prisma",
"post_install": "npm run migrate && npm run dp:push && npm run generate",
"db:deploy": "npx prisma deploy",
"migrate": "npx prisma migrate dev --name init-db",
"generate": "npx prisma generate",
"prod:start": "node ./dist/index.js",
"db:push": "npx prisma db push",
"studio": "npx prisma studio",
"copy-assets": "cp -r ./views ./assets dist",
"lint:ts": "ESLINT_USE_FLAT_CONFIG=false eslint --config eslint.config.js .",
"lint": "eslint . --ext .js,.ts",
"lint:fix": "eslint . --ext .js,.ts --fix",
"format": "prettier --write ."
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/bcrypt": "^5.0.0",
"@types/compression": "^1.7.5",
"@types/cors": "^2.8.13",
"@types/express": "^4.17.17",
"@types/hapi__joi": "^17.1.9",
"@types/jsonwebtoken": "^9.0.2",
"@types/lodash": "^4.14.202",
"@types/multer": "^1.4.7",
"@types/node": "^22.1.0",
"@types/node-forge": "^1.3.5",
"@types/node-schedule": "^2.1.5",
"@types/swagger-jsdoc": "^6.0.1",
"@types/swagger-ui-express": "^4.1.3",
"@types/uuid": "^9.0.7",
"flutterwave-node-v3-withtypes": "^1.0.11",
"prisma": "^6.0.1",
"ts-node": "^10.9.1",
"ts-node-dev": "^2.0.0",
"tsc-alias": "^1.8.7",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.6"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.705.0",
"@aws-sdk/client-sns": "^3.699.0",
"@aws-sdk/client-sqs": "^3.699.0",
"@aws-sdk/client-sts": "^3.699.0",
"@aws-sdk/client-timestream-query": "^3.699.0",
"@hapi/joi": "^17.1.1",
"@hyperdx/node-opentelemetry": "^0.8.1",
"@prisma/client": "^6.0.1",
"@sendgrid/mail": "^7.7.0",
"axios": "^1.4.0",
"bcrypt": "^5.1.0",
"compression": "^1.7.4",
"cors": "^2.8.5",
"date-fns": "^2.30.0",
"dotenv": "^16.3.1",
"express": "^4.19.2",
"express-handlebars": "^7.1.2",
"express-validation": "^4.1.0",
"flutterwave-node-v3": "^1.1.6",
"geolib": "^3.3.4",
"handlebars": "^4.7.8",
"jsonwebtoken": "^9.0.1",
"lodash": "^4.17.21",
"multer": "^1.4.5-lts.1",
"node-forge": "^1.3.1",
"node-schedule": "^2.1.1",
"redis": "^4.6.8",
"socket.io": "^4.7.2",
"sql-bricks": "^3.0.1",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.0",
"twilio": "^4.19.3",
"uuid": "^9.0.1",
"winston": "^3.11.0"
}
}```
Victor Ebubechukwu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
5