[Windows] 'ts-node' is not recognized as an internal or external command,
See original GitHub issueSteps taken to reproduce:
- run
npm i -g prisma2@2.0.0-preview-13
- run
prisma2 init hello-world
- select GraphQL API starter kit + TypeScript
error:
Downloading the starter kit from GitHub ...
✔ Extracting content to hello-world ...
✔ Installing dependencies with: `npm install` ...
✔ Preparing your database ...
⠙ Seeding your database with: `npm run seed` ...
ERROR Error during command execution
'ts-node' is not recognized as an internal or external command,
operable program or batch file.
I am guessing that this is because I don’t have ts-node
installed globally on my PC ?
When I ran npm i -g ts-node
and retried, I got the following error:
✔ Downloading the starter kit from GitHub ...
✔ Extracting content to hello-world1 ...
✔ Installing dependencies with: `npm install` ...
✔ Preparing your database ...
⠸ Seeding your database with: `npm run seed` ...
ERROR Error during command execution
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'typescript'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.resolve (internal/modules/cjs/helpers.js:32:19)
at Object.register (C:\Users\Bruno\AppData\Roaming\npm\node_modules\ts-node\dist\index.js:138:30)
at Object.<anonymous> (C:\Users\Bruno\AppData\Roaming\npm\node_modules\ts-node\dist\bin.js:94:25)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! typescript-graphql@ seed: `ts-node prisma/seed.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the typescript-graphql@ seed script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Bruno\AppData\Roaming\npm-cache\_logs\2019-09-27T11_01_55_586Z-debug.log
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
'ts-node' is not recognized as an internal or external command ...
1) Install nodemon locally --> npm i nodemon · 2) In your package. · 3) Now run npm start (this will automatically run...
Read more >'ts-node' is not recognized as an internal or external command
'ts-node' is not recognized as an internal or external command # · Open the start search and type in env and then click...
Read more >'ts-node' is not recognized as an internal or external command
This is going to be a windows path config problem rather than nodemon. nodemon doesn't use npm, but npm is used to install...
Read more >How to fix ts-node is not recognized as an internal or external ...
ts - node not recognizedts- node is not recognized as an internal or external commandts- node is not available in path pm2ts- node...
Read more >How to resolve 'node' is not recognized as an internal or ...
Open the Environment Variables option in your Control Panel. · Select the variable named Path. · Restart the command prompt again and now...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
2.0.0-preview-13 😃
I can also reproduce this on mac, this is the issue that affects both mac and windows: https://github.com/prisma/prisma2/issues/482
I am closing this one as a duplicate 🙏 If you think that this issue should still be open, please comment here and tag me.