Cannot find module 'ts-node/register'

前端 未结 7 1685
青春惊慌失措
青春惊慌失措 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条回答
  •  梦毁少年i
    2021-02-06 20:46

    Error:
    module.js:328
        throw err; 
    Error: Cannot find module 'ts-node'
    

    Solution: Following command solves the issue.

    npm install ts-node --save-dev
    

    (Installs ts-node as a development dependency for your project)

提交回复
热议问题