R
Railway11mo ago
mgrabina

This is not the tsc command you are looking for

I have two projects with exact similar configuration and versions and one started to throw npm WARN exec The following package was not found and will be installed: [email protected] 25.28 25.28
25.28 This is not the tsc command you are looking for
25.28
25.28 25.28 To get access to the TypeScript compiler, tsc, from the command line either: 25.28 25.28 - Use npm install typescript to first add TypeScript to your project before using npx 25.28 - Use yarn to avoid accidentally running code from un-installed packages
No changes were made. Any ideas?
Solution:
could you try removing npx from the command
Jump to solution
14 Replies
Percy
Percy11mo ago
Project ID: 5e850af2-d74a-4973-a849-a0107b7a93d4
mgrabina
mgrabinaOP11mo ago
5e850af2-d74a-4973-a849-a0107b7a93d4 ╔════════════════════ Nixpacks v1.20.0 ═══════════════════╗ ║ setup │ nodejs_18, yarn-1_x, openssl ║ ║─────────────────────────────────────────────────────────║ ║ install │ yarn -v && yarn install --check-cache ║ ║─────────────────────────────────────────────────────────║ ║ build │ yarn build-relayer && yarn migrate-relayer ║ ║─────────────────────────────────────────────────────────║ ║ start │ yarn start-relayer ║ ╚═════════════════════════════════════════════════════════╝ of course typescript is in dependencies in package.json
Fragly
Fragly11mo ago
Mind sharing your package.json?
mgrabina
mgrabinaOP11mo ago
{ "version": "0.0.2", "scripts": { "build": "shx rm -rf build && tsc -p tsconfig.json && yarn export-types", "start": "node build/src/index.js", }, "dependencies": { ... "typescript": "5.2.2", }, "devDependencies": { ... }, "prisma": { "seed": "ts-node ./prisma/seed.ts" }, "engines": { "node": "18" } }
Fragly
Fragly11mo ago
could you share the full one without removing packages?
Fragly
Fragly11mo ago
that's interesting the reason I asked for your packages is because the error you're seeing happens when you install tsc ( which is not typescript anymore and a lot of peope accidentally installs this instead of typescript ) Doesn't seem like you have that installed though.. 🤔 have you installed tsc in the past?
mgrabina
mgrabinaOP11mo ago
i see nope
Fragly
Fragly11mo ago
Ah!
Fragly
Fragly11mo ago
over here:
No description
Solution
Fragly
Fragly11mo ago
could you try removing npx from the command
Fragly
Fragly11mo ago
in export-types script
mgrabina
mgrabinaOP11mo ago
worked! thank. you so much!
Fragly
Fragly11mo ago
Awesome! happy to help 🙂
Want results from more Discord servers?
Add your server