Cannot find module 'ts-node/register'

前端 未结 7 1686
青春惊慌失措
青春惊慌失措 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 20:46

    Try this command instead:

    mocha --compilers ts:ts-node/register,tsx:ts-node/register
    

    which works for me.

提交回复
热议问题