0

I am building an ionic project for my final year project, and suddenly my laptop got a short circuit. So right now I'm developing back my project through multiple computers/laptop, but my project seems cannot shows it output. Every time I did ionic serve, it is throwing an error saying Runtime Error: Cannot find module "@angular/core/src/view/util". I've already google about this but there is no answer until now even there is one similar question with me, it still cannot solve this problem. Can anyone help me in this?

5
  • 1
    Did you try npm install at the project path in terminal?? Commented Apr 23, 2019 at 7:05
  • Please share the relevant parts of your code. Commented Apr 23, 2019 at 7:06
  • stackoverflow.com/questions/48852812/… Did you try what this one did? npm install and remove '/src/util' from your ts import Commented Apr 23, 2019 at 7:09
  • @DanielPiñeiro I already did npm install but did not do the remove /src/util from ts import as I didn't understand which one of the ts part. Commented Apr 23, 2019 at 7:22
  • Check in your project where /src/util is declared and if you are really using it. Commented Apr 23, 2019 at 7:26

2 Answers 2

2

Search in the project @angular/core/src/view/util and substitute it with @angular/core. This is probably a problem caused by the auto-importer, since it randomly imports the symbol by a point where it's exported. But you should never and never again import something from a src folder!

Sign up to request clarification or add additional context in comments.

2 Comments

I change import { resolveDefinition } from '@angular/core/src/view/util'; to import { resolveDefinition } from '@angular/core';.. but it appears as error
wait.. I found the problem.. it because I used resolveDefinition(err) instead of resolve(err)..Anyway, thank you for all the suggestions..
0

delete the node-module folder. run 'npm install' command from the root directory. this should do the trick. this installs every dependency listed in your package.json file. if u want to install new packages,just run 'npm i your package name

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.