Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67469

Ionic Not Compiling Until Recompiled 3 Times

$
0
0

I have created an ionic app and it has stopped compiling successfully first time.

First Time i compile it I get an error : "localhost/:1 Refused to load the image 'http://localhost:8100/favicon.ico' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback. localhost/:1 Failed to load resource: the server responded with a status of 404 (Not Found)" ,and the screen shows 'Cannot GET'. The error was as follows:

1st Compile

When I make a change to my code and recompile the code (comment out a random line of code)This is the error I get: "Uncaught Error: Unexpected module 'LoginPageModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation.

And I get a white screen.

2nd Compile

When a undo the changes I have just done(i.e uncomment the random line I had previously commented). Recompile it the app finally compiles successfully.

Third Compile

tsconfig.json:

{"compileOnSave": false,

"compilerOptions": {

"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"typeRoots": [
  "node_modules/@types"
],
"lib": [
  "es2018",
  "dom"
]

},

"angularCompilerOptions": { "fullTemplateTypeCheck": true, "strictInjectionParameters": true } }


Viewing all articles
Browse latest Browse all 67469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>