CitizensFoundation/your-priorities-app

Client build generates some CSS and JS errors

eraviart opened this issue · 6 comments

I am trying to migrate to v7.1.1 (same problem with master).

yarn install
cd client_app/
bower install

Everything works and even the client_app is OK. But when I rebuild the client_app:

npm install polymer-cli
cd client_app/
../node_modules/gulp/bin/gulp.js build

then the client has some CSS and JavaScript errors:
image

I have to restore the generated files to their original value, to ensure that the client works well again:

git status
	modified:   build/bundled/bower_components/i18next/i18next.min.js
	modified:   build/bundled/service-worker.js
	...
	modified:   ../yarn.lock
git checkout -- git checkout -- build/bundled/bower_components/i18next/i18next.min.js build/bundled/service-worker.js

image

Any clue of what can cause this problem?

Note, I had to modify package.json, to allow gulp to be installed:

-gulp@gulpjs/gulp#3.9:
+gulp@gulpjs/gulp#v3.9.1:

@eraviart You said there were Javascript errors - can you also include a screenshot of those? And what version of the polymer-cli is running:
polymer --version

$ node_modules/.bin/polymer --version
1.6.0

Console log (on Firefox):
screenshot from 2018-03-26 16-52-35

Console log (on Chromium):

yp-app.html?v=7.1.23:62 Page changed to group
yp-app.html?v=7.1.23:62 Trying to load https://questions.parlement-ouvert.fr/src/yp-group/yp-group.html?v=7.1.23
yp-app.html?v=7.1.23:1 Clearing scrolling triggers for notifications
yp-app.html?v=7.1.23:1 _removeSplashNode
yp-app.html?v=7.1.23:1 Removing splash
yp-app.html?v=7.1.23:1 _loggedInUser
yp-app.html?v=7.1.23:1 _gotAdminRights
[Deprecation] Styling master document from stylesheets defined in HTML Imports is deprecated, and is planned to be removed in M65, around March 2018. Please refer to https://goo.gl/EGXzpw for possible migration paths.
yp-app.html?v=7.1.23:1 _removeSplashNode 2
yp-app.html?v=7.1.23:1 I have loaded font
app.js?v=7.1.23:1 Have created event listener
app.js?v=7.1.23:1 removing splash screen
yp-app.html?v=7.1.23:1 activity stream: -1 open group_tab_open
app.js?v=7.1.23:1 Changed language to fr
yp-app.html?v=7.1.23:1 changeLocaleIfNeeded fr
yp-app.html?v=7.1.23:1 i18n init loaded undefined
yp-app.html?v=7.1.23:1 Changed language to fr
yp-app.html?v=7.1.23:1 activity stream: -1 click changeLanguage
yp-group.html?v=7.1.23:1 _loadMoreData for groupId: 4 statusFilter: open
yp-app.html?v=7.1.23:1 changeLocaleIfNeeded fr
yp-app.html?v=7.1.23:1 Not loading the same font /styles/fonts/default-font.html?v=7.1.23
app.js?v=7.1.23:1 Remove splash with delay
yp-dialog-container-delayed.html?v=7.1.23:1 Location hidden changed
app.js?v=7.1.23:1 removing splash screen
yp-app.html?v=7.1.23:1 _removeSplashNode 3
yp-app.html?v=7.1.23:1 Clearing scrolling triggers for notifications
yp-group.html?v=7.1.23:1 Clearing scrolling triggers for group
_clearScrollThreshold @ yp-group.html?v=7.1.23:1
i @ yp-app.html?v=7.1.23:1
(anonymous) @ yp-app.html?v=7.1.23:1
e @ yp-app.html?v=7.1.23:1
(anonymous) @ yp-app.html?v=7.1.23:1
_postsResponse @ yp-group.html?v=7.1.23:1
i @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
_handleResponse @ yp-app.html?v=7.1.23:1
Promise.then (async)
generateRequest @ yp-app.html?v=7.1.23:1
generateRequest @ yp-app.html?v=7.1.23:1
_loadMoreData @ yp-group.html?v=7.1.23:1
_groupChanged @ yp-group.html?v=7.1.23:1
s @ yp-app.html?v=7.1.23:1
i @ yp-app.html?v=7.1.23:1
n @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
_groupsResponse @ yp-group.html?v=7.1.23:1
i @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
_handleResponse @ yp-app.html?v=7.1.23:1
Promise.then (async)
generateRequest @ yp-app.html?v=7.1.23:1
generateRequest @ yp-app.html?v=7.1.23:1
_getGroup @ yp-group.html?v=7.1.23:1
_groupIdChanged @ yp-group.html?v=7.1.23:1
s @ yp-app.html?v=7.1.23:1
i @ yp-app.html?v=7.1.23:1
n @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
_routeIdChanged @ yp-group.html?v=7.1.23:1
v @ yp-app.html?v=7.1.23:1
i @ yp-app.html?v=7.1.23:1
n @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ yp-app.html?v=7.1.23:1
value @ custom-elements-es5-adapter.js:4
window.Polymer._polymerFn @ yp-app.html?v=7.1.23:1
window.Polymer @ yp-app.html?v=7.1.23:1
(anonymous) @ yp-group.html?v=7.1.23:1
app.js?v=7.1.23:1 Remove splash with delay

@eraviart I'm not able to replicate those errors in the development build for Firefox nor after I run gulp build.

Couple of things to try:

  1. Can you do rm -r client_app/bower_components/* before you run bower install - just to make sure you are getting the latest versions of everything like I have - I just rebuilt my system like this.

  2. When you run gulp build can you send me the output of the build processes?

  3. Then when you run the broken build, can you send me the Chrome debug console output:

Removing existing bower_components, by doing:

cd client_app/
rm -r bower_components/*

before:

../node_modules/gulp/bin/gulp.js build

solved the problem!

Thanks a lot @rbjarnason !

@eraviart Great, usually you would not have to do this but as this was such a big upgrade in terms of moving from Polymer 1 to 2. I'm adding a text about this in the readme.