Ts-loader: Error: Cannot find module 'typescript'

Created on 23 May 2019  路  1Comment  路  Source: TypeStrong/ts-loader

ts-loader v.5.2.1
typescript 3.2.1

it works well in previous environment.

I just commit all of my project files into my repository.

and I formatted my laptop and reinstall everything with my repo.
then, this behaviors happened.

Of course, I installed typescript both local and global.

'tsc' command works in terminal, too. what's the problem?

Expected Behaviour

works well with current typescript

Actual Behaviour

Error: Module build failed (from ./node_modules/ts-loader/index.js):
Error: Cannot find module 'typescript'

Steps to Reproduce the Problem

Location of a Minimal Repository that Demonstrates the Issue.

Most helpful comment

I found a solution. since I linked with 'npm link typescript' it works with some compile time. thanks.

>All comments

I found a solution. since I linked with 'npm link typescript' it works with some compile time. thanks.

Was this page helpful?
0 / 5 - 0 ratings