Cannot find module 'ts-node/register'

前端 未结 7 1680
青春惊慌失措
青春惊慌失措 2021-02-06 20:01

I want to use mocha to test my TypeScript/Angular2 project. I tried to use ts-node as described here:

npm install -g ts-node
<
相关标签:
7条回答
  • 2021-02-06 21:04

    Since the answer that works for a lot of people appears to be hidden in the comments, I'll post it as an actual answer to the question, now that it appears the question has been reopened.

    I had this problem as well. Not sure why this Q has been closed. but installing ts-node locally fixes this. npm install ts-node --save-dev

    Thanks @Anita, as this was the answer that worked for me too.

    0 讨论(0)
提交回复
热议问题