polymer serve reformats files - visual-studio-code

I am developing an application with Polymer 1.8.0. While trying to remote debug in Chrome from VSCode I noticed that the line numbers in the Chrome source view did not match with the line numbers in VSCode and henceforth debugging did not work at all.
After some testing I realized that polymer serve seems to reformat the files, e.g. the source file (line break with LF, indention with spaces)
<link rel="import"
href="../polymer/polymer-element.html">
would be delivered as
<link rel="import" href="../polymer/polymer-element.html">
with no line break at all.
My first guess was that the recompilation feature for ES6 was to blame and I disabled it with polymer server --compile never but with no success.
I am using Mint 19, Polymer 1.8.0, Chrome 70, VSCode 1.28.1

Seems to be a known bug, see here: https://github.com/Polymer/tools/issues/389

Related

ag-grid theme customization issue and resolve-url-loader failing

We used ag-grid version 20 in our application and I followed the instructions on how to import the theme and override the scss variables in our React application. Everything went great and worked as expected. We just updated to version 21.0 so we can use the dndSource feature, but our code won't compile anymore. The error we get is
"Module build failed: Error: resolve-url-loader: CSS error
source-map information is not available at url() declaration"
I looked around and this is what libsass library listed:
Windows line breaks
Normal windows linebreaks are CRLF. But sometimes libsass will output single CR characters.
This problem is specific to multiline declarations. Refer to the libsass bug #2693.
If you have any such multiline declarations preceding url() statements it will fail your build.
Libsass doesn't consider these orphan CR to be newlines but postcss engine does. The result being an offset in source-map line-numbers which crashes resolve-url-loader.
Module build failed: Error: resolve-url-loader: CSS error
source-map information is not available at url() declaration
Some users find the node-sass linefeed option solves the problem.
Solutions
Try the node-sass linefeed option by way of sass-loader.
Not sure how to get around this? We use create-react-app and I dont think the team likes the idea of ejecting and then taking over the webpack config.
Short answer - configure your editor to save files with Linux line endings. Stop putting Windows line endings in your source files, and you won't have that problem.

Ionic 2 serve error

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.

WebStorm 12 EAP - JavaScript debug configuration doesn't work with built-in webserver

I am trying to start debugging session using built-in WebStorm server after I created a new JavaScript debug configuration. I am using this project:
https://github.com/pauldessert/SeedTip.git
I am experiencing this weird problem that all of my locally referenced .css and .js files:
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/map.js"></script>
<script src="js/search.js"></script>
...could not be found/loaded by the browser. I show this in bellow image when I pressed F12 to see Chrome Dev tools (this action seems to disconnect WebStorm IDE support extension) and you can see failed requests.
You can see in the console tool window in WebStorm that there were get request for .css and .js local files. When I press any of these links it opens ok in my Chrome browser.
E.g. this file does exist:
http://localhost:63342/SeedTip/css/style.css
When I use an external node server e.g. grunt-serve and create JS debug configuration with URL: http://localhost:9000/index.html pointing to:
F:\Projects\Angular\v2\SeedTip and run this debug it works.
Note: I have the same problem with enabling Angular 2 apps to load with systemjs.
I tried setting but it doesn't help.
I was a known bug, that was fixed in the latest build.

GWT project unable to load **.nocache.js in the default html file

Currently I am developing a GWT project by using GWT 2.4.0 in eclipse 3.7. I deploy the app inside Tomcat 7. It run perfectly for the past 2 months.
However, now I am running into a problem which I unable to trace the problem. Here is the source code for "welcomeGWT.html".
<!doctype html>
<!--
The DOCTYPE declaration above will set the browser's rendering engine into
"Standards Mode". Replacing this declaration with a "Quirks Mode" doctype may
lead to some differences in layout.
-->
<html>
<head>
<meta name='gwt:module' content='com.haircare101.cesapp.Main=com.haircare101.cesapp.Main'>
<title>101 HairCare: Customer Excellence System</title>
</head>
<body>
<script type="text/javascript" src="com.haircare101.cesapp.Main/com.haircare101.cesapp.Main.nocache.js"></script>
</body>
</html>
As the tomcat started, I type the corresponding URL into browser and it shows me this page with no error (no error shows inside Tomcat log files). But it unable to direct me to the specified GWT Main Entry Point (I saw this source file when I can "View Source" of browser).
** I have no compilation error, no deployment error or no runtime error.
Can anybody tells me the reason why it stuck in this page? Many thanks and appreciate!
Cheers,
Ryan C.
Besides using google chrome, enable firebug to debug your javascript and find out what's wrong. Apparently you have an array acess problem.
Most probably, it is in your GWT entry point and not in javascript (don't forget that all the client package code is transformed into javascript)

I can't change from standard to clean theme

I remove the inherit of standard the from my module and replaced for:
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
But my project still includes the standar theme, and after the clean:
<link rel="stylesheet" href="http://127.0.0.1:8888/formulariorequerimientos3/gwt/clean/clean.css">
<link rel="stylesheet" href="http://127.0.0.1:8888/formulariorequerimientos3/gwt/standard/standard.css">
So the styles are mixed and I see the horrible dialogbox of standard theme, please help!
Probably caching issue. Shut down you dev IDE and server serving the app .It's should really be in hosted mode.Clear browsers cache. Shut down your machine and restart. You will not have to do this all the time but sometimes caches get stuck. Also make sure there are not error in IDE and and check sever log as well (meaning logs from hosted mode server) to see any errors being thrown.
Check your War\Webapp if you see clean/clean.css then delete clean folder altogather. Also suggest Project->clean if you are using eclipse.
The problem is that I wa including a module (one of UI utils) that inherits standard theme, so I replaced for clean