aws-samples / aws-sdk-js-notes-app

A simple note taking application using modular AWS SDK for JavaScript (v3)
Other
81 stars 28 forks source link

yarn cdk deploy throws "Cannot find module 'typescript'" error #46

Closed trivikr closed 2 years ago

trivikr commented 2 years ago

Describe the bug

yarn cdk deploy throws "Cannot find module 'typescript'" error.

Steps to reproduce

$ yarn
...

$ yarn build:backend

  dist/updateNote/app.js  243.0kb
  dist/createNote/app.js  242.8kb
  dist/deleteNote/app.js  242.4kb
  dist/getNote/app.js     240.6kb
  dist/listNotes/app.js   238.5kb

⚡ Done in 98ms

$ yarn cdk deploy

Observed behavior

Throws error:

npx: installed 14 in 5.897s
Cannot find module 'typescript'
Require stack:
- /Users/trivikr/.npm/_npx/8222/lib/node_modules/ts-node/dist/index.js
- /Users/trivikr/.npm/_npx/8222/lib/node_modules/ts-node/dist/repl.js
- /Users/trivikr/.npm/_npx/8222/lib/node_modules/ts-node/dist/bin.js
Subprocess exited with error 1

Expected behavior

yarn cdk deploy should be successful.

trivikr commented 2 years ago

Refs: https://github.com/TypeStrong/ts-node/issues/1426