Ionic 2 serve error - ionic-framework

I got the following errors after ionic serve --lab:
Any Idea why the error above is occurred?
Ionic cli version 3.9.0
App scripts version 1.4.1
Typescript 2.3.9
Thanks.

Stylesheets don't get applied and javascript is not executed, because your browser reports wrong MIME types for these requested documents. They're all sent as text/html.
It seems to be the same problem, as reported here.
You may try to go to any of the .ts files like user.ts or app.ts and save them again. This will trigger the automatic build, once finished, your app should run fine again.

After some investigations I found very similar problems.
Could you try the following:
Add <base href="/"> in head before linking all css files
https://github.com/froala/angular-froala/issues/170#issuecomment-386117678
https://github.com/angular/angular-cli/issues/10325#issuecomment-399329033

I faced the same issue many times.when i close the console and run it again as ionic serve it worked for me properly.Try this once.

Related

flutter build web - Only showing blank page

Strangely, I am unable to deploy flutter apps via Flutter web since some days.
I have not problem running and debugging the Flutter app in a chrome browser via Android studio but once I try
flutter build web
the generated index.html file unter /build/web/ will show a blank page with these errrors:
Chrome error messages image
I started a completely new project so the error will not be due to my bad code writing :P
Can somebody help?
just change to <base href="./"> in index.html after you build the web.
Try remove .dart-tool folder in your project folder and rebuild your projcet.
I had the same error and changing index.html not worked. I solved it by removing .dart-tool folder in your project folder. After removing it, IDE shows some errors but flutter build web works fine.
Here is the origin link. https://github.com/flutter/flutter/issues/61464#issuecomment-924577391
just Clear browsing data in privacy and security
if not see any error in the console
This is an old question, but it seems to perpetuate (I also crashed into it). So here is what helped me to solve the problem:
The doc says:
Update the <base href="/"> tag in web/index.html to the path where your app is hosted.
In my case, it was htdocs/app, so base href become <base href="/app">, which fix the problem for me.

Cannot start the application. TypeError: Cannot read property 'definition' of undefined at getFieldsJsonSchemaFor

I'm getting an extremely weird error when trying to npm start my loopback application. I literally did nothing to the code and then this all of a sudden started to happen
Cannot start the application. TypeError: Cannot read property
'definition' of undefined
at getFieldsJsonSchemaFor (/Users/vikramkhemlani/Desktop/loopback/node_modules/#loopback/repository-json-schema/dist/filter-json-schema.js:101:64)
I have the same exact code in another file (which i actually created a git repo from using this repo) but this one is throwing this error for some reason
I went through the same issue.
Apparently there are caches which need to clean up before starting the application. (Expired caches also appear in openapi before I get into this issue)
The project needs to be clean and re-install packages by following:
npm run clean
npm install
I have the same problem.
However, I solved it when I tried the following.
delete node_modules directory.
npm install.
Hello from the LoopBack team 👋
This may be a bug in LoopBack introduced by recent changes. Please create a small application reproducing the problem (see our Bug reporting instructions) and open a new GitHub issue in https://github.com/strongloop/loopback-next/issues/new

Ionic Cloud: Getting Error Registry returned 404 for Get

I keep getting this error in my output when trying to package iOS through Ionic cloud "Error: Registry returned 404 for GET on https://registry.npmjs.org/[MyAppName]". I've followed a few other forum posts that I could find to no avail. Any help would be much appreciated!
in package.json you have [MyAppName] as package or something like that, which when trying to fetch from npmjs.com its not there since you havent publish it, post package.json to check it.
I was using [MyAppName] as a placeholder for my physical app name; for the post. The issue turned out to be the Cordova plugins directory.
To resolve I ran:
ionic state clear --plugins
This, however, resulted in only partial removal of the plugins. I further had to manually delete the rest. Finally I ran:
ionic state restore --plugins
I can build successfully now.

Live reload is not working with Ionic serve command

As per the Ionic Guide Chapter 4 http://ionicframework.com/docs/guide/testing.html, ionic serve will start a live reload server, which it does in my case, but reload is not happening.
Is there any pre-req we need to have for this thing to work? Like say live reload chrome extension?
E:\Ionic\myapp>ionic serve
Running dev server: http://localhost:8100
Running live reload server: http://localhost:35729
Here is what worked for me:
stop ionic service if you running it 'q' command
run: ionic address from command prompt
After running this command it will prompt you to select what address you would like to use one is localhost and the second one is your machine IP address.
Try to use select your machine IP address instead of localhost.
Even I faced similar issue, console used to display the file changed but automatic browser refresh wasn't happening. Later I found out a missing closing tag in my index.html page that prevented ionic to inject the below script required for live reload.
<script src="//localhost:35729/livereload.js?snipver=1"></script>
Please check for any typo errors or other html issues in the index.html page and fix those. Live reload should word properly after that.
In Ionic 2/3, I solved this problem by removing the folder node_modules/ and file package-lock.json, then at terminal run:
npm install --save
I'm my case, I was bootstraping the app with this:
window.ionic.Platform.ready(function() {
angular.bootstrap(document, ['myApp']);
});
Then I changed it for this:
<body ng-app="myApp" >
<ion-nav-view></ion-nav-view>
</body>
And it works
if you want to get Live console logs in the ionic application (real
device or emulator)
ionic cordova run android --livereload --consolelogs --serverlogs

meteor minified with production flag fails to load certain files

I am not getting any errors from the server or the browser console but my application seems to break when i minify or use the --production flag. I have went back to a revision/changeset that i recall working with meteor deploy and it still fails. Has anyone else faced this problem ?
I should mention, i just ran this with an older version of meteor and it works. Meteor version 0.7.0.1 looks like might be the problem?
EDIT: Running 0.6.6.3
I ran meteor --release 0.6.6.3 --production to minify and use an older version of meteor. This works perfectly, any one know if the bundling process has changed in the latest version of meteor ?
Way back with v0.6.4.1 we had issues if we had #media statements split across multiple files. Putting them all in one file avoided the css minification problems. May work for your #import statements as well.
-- update --
"I looked back at all my #import statements and found one that was commented out and saw that in production my css file had been corrupted." #Warz in comments
So it looks like commenting out #import statements is not supported in the css minifier as of Meteor v0.7.0.1.
Something went wrong while minified javascript files. I temporarily deploy without minifying to avoid this kind of problems:
meteor deploy --debug yoursite.meteor.com