help icon indicating copy to clipboard operation
help copied to clipboard

Cannot find module 'typescript'

Open rajarajan1985 opened this issue 3 years ago • 2 comments

Details

I'm trying to run CDK deploy on the GitHub runner (ubuntu build) and I'm getting this below exception. I have typescript and ts-node added to the package.json under devDependencies. The code is running fine locally but not on the runner.

Cannot find module 'typescript'
Require stack:
- /root/.npm/_npx/13740/lib/node_modules/ts-node/dist/util.js
- /root/.npm/_npx/13740/lib/node_modules/ts-node/dist/bin.js

Node.js version

Node version 14.

Example code

No response

Operating system

ubuntu

Scope

NA

Module and version

Not applicable.

rajarajan1985 avatar Jun 29 '22 16:06 rajarajan1985

ts-node needs a version of TypeScript near it - you need to npm i typescript - you can follow the ts-node installation instructions to learn more :)

benjamingr avatar Jul 05 '22 16:07 benjamingr

There has been no activity on this issue for 11 months. The help repository works best when sustained engagement moves conversation forward. The issue will be closed in 1 month. If you are still experiencing this issue on the latest supported versions of Node.js, please leave a comment.

github-actions[bot] avatar Jan 02 '24 01:01 github-actions[bot]

(This issue seems completed; closing)

avivkeller avatar Apr 21 '24 00:04 avivkeller