1

I am new at ionic framework while trying to build the app using "ionic serve" I am facing error: cannot find module 'typescript'.

I have installed the same using npm install -g typescript. Still facing the same issue. What am I missing?

3
  • Just to be sure, does typescript appear in both your package.json file and your node_modules folder? Commented Jul 27, 2017 at 13:04
  • Yes it does have Commented Jul 27, 2017 at 17:25
  • What version of Ionic and TypeScript are you using? Commented Jul 27, 2017 at 17:40

2 Answers 2

3

Problem occurs when you install a new cordova plugin and then directly running. To resolve do the following.

  1. Delete node_modules folder
  2. npm cache clean --force
  3. npm i
Sign up to request clarification or add additional context in comments.

Comments

2

Try install TS locally: npm install typescript.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.