Error when i delete folder from pages directory then get an error


#1

main.js:116 Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, open 'C:\Users\lenovo\Desktop\ionReddit\src\pages\contact\contact.ts’
at Error (native)
at Error (native)
at Object.194 (http://localhost:8100/build/main.js:116:7)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object.192 (http://localhost:8100/build/main.js:44:75)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object.256 (http://localhost:8100/build/main.js:249:75)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object.215 (http://localhost:8100/build/main.js:177:73)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object.196 (http://localhost:8100/build/main.js:161:70)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)

ionic info
cli packages: (C:\Users\lenovo\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

local packages:

@ionic/app-scripts : 3.0.0
Ionic Framework    : ionic-angular 3.7.1

System:

Node : v6.11.0
npm  : 5.4.2
OS   : Windows 10

Misc:

backend : pro

#2

Did you delete the contact folder?


#3

Are you trying to import ContactPage somewhere? Likely in your app.module.ts?


#4

yes i delete contact folder but i also delete “import contactpage” from everywhere it is used.


#5

The compiler seems to be suggesting otherwise. Your IDE should have a “find in path” function that can help you find references you may have missed.


#6

@Priyanka6132

can you solve the problem ?
if not then delete your www folder from your project. again run the project it will remove this error.


#7

You might have removed all imports of ContactPage, but did you also remove it from the declarations and entryComponents arrays in app.module.ts?


#8

yes i removed it from declaration and entry points. but it works fine now because i run the project again. then it works fine . thanks to all for your suggestions.