I am trying to deploy my rest api created in node with typescript in render. However, at the time of deployment I get the following log:
==> Exited with status 127==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys==> Using Node version 20.15.1 (default)==> Docs on specifying a Node version: https://render.com/docs/node-version==> Using Bun version 1.1.0 (default)==> Docs on specifying a bun version: https://render.com/docs/bun-version==> Running 'npm run dev'> drivesafe-backend@1.0.0 dev> nodemon ./src/app.tssh: 1: nodemon: not found
When deploying I put in root directory: src. In build command: npm install. And in start command:npm run dev
This is the package.json of my project
{"name": "drivesafe-backend","version": "1.0.0","main": "index.js","scripts": {"dev": "nodemon ./src/app.ts" },"keywords": [],"author": "","license": "ISC","description": "","devDependencies": {"@types/bcryptjs": "^2.4.6","@types/cors": "^2.8.17","@types/dotenv": "^6.1.1","@types/express": "^4.17.21","@types/jsonwebtoken": "^9.0.7","@types/multer": "^1.4.12","@types/mysql2": "github:types/mysql2","@types/sequelize": "^4.28.20" },"dependencies": {"bcryptjs": "^2.4.3","cors": "^2.8.5","dotenv": "^16.4.5","express": "^4.21.0","jsonwebtoken": "^9.0.2","multer": "^1.4.5-lts.1","mysql2": "^3.11.3","sequelize": "^6.37.3" }}
I have tried putting this in build command:npm install npm install typescript -g npm install i ts-node -g npm install i nodemon -g tsc —init npm init -y npm i express cors dotenv multer mysql2 npm i @types/express @types/cors @types/dotenv @types/multer -D npm i --save-dev types/mysql2# npm i bcryptjs npm i jsonwebtoken
However, when I do this I get another problem:
==> Docs on specifying a Node version: https://render.com/docs/node-version==> Using Bun version 1.1.0 (default)==> Docs on specifying a bun version: https://render.com/docs/bun-version==> Running build command 'npm install npm install typescript -g npm install i ts-node -g npm install i nodemon -g tsc —init npm init -y npm i express cors dotenv multer mysql2 npm i @types/express @types/cors @types/dotenv @types/multer -D npm i --save-dev types/mysql2# npm i bcryptjs npm i jsonwebtoken'...npm error arg Argument starts with non-ascii dash, this is probably invalid: —initnpm error code EINVALIDTAGNAMEnpm error Invalid tag name "—init" of package "—init": Tags may not have any characters that encodeURIComponent encodes.npm error A complete log of this run can be found in: /opt/render/.cache/_logs/2024-10-06T17_05_36_663Z-debug-0.log==> Build failed 😞==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys```