Closed filippomc closed 5 years ago
It looks like in windows eslint is recursively looking for .eslint files inside node_modules. The problem seems related to this: https://github.com/eslint/eslint/issues/9227.
Ignoring node_modules in .eslintignore fixes the problem but with this we cannot do the check on geppetto-client anymore with eslint ./node_modules/@geppettoengine/geppetto-client/js/**/*.js
on the application.
Do we really want to check the linting of geppetto-client on the application build?
cc @tarelli @rodriguez-facundo
With the fix above, another error occurs:
ERROR in ./node_modules/css-loader!./node_modules/less-loader/dist/cjs.js?{"modifyVars":{"url":"'C:/Users/filip/geppetto-application/css/colors'"}}!./node_modules/@geppettoengine/geppetto-client/js/components/interface/share/Share.less
Module build failed:
//Set based on GeppettoConfiguration
@import "@{url}";
^
Can't resolve './C:Users
ilipgeppetto-applicationcsscolors.less' in 'C:\Users\filip\geppetto-application\node_modules\@geppettoengine\geppetto-client\style\less\components'
in C:\Users\filip\geppetto-application\node_modules\@geppettoengine\geppetto-client\style\less\components\colors.less (line 2, column 0)
@ ./node_modules/@geppettoengine/geppetto-client/js/components/interface/share/Share.less 4:14-204
@ ./node_modules/@geppettoengine/geppetto-client/js/components/interface/share/Share.js
@ ./components/Application.js
@ ./Main.js
Related to windows \ path separators?
I tested this one and I found that the build is not working properly on windows. If we delete the linting, we still have a wrong build process.
Unfortunately, the virtual machine I used for windows is insanely slow. Just switching tabs takes a good 4 to 6 seconds. I dont think I am going to be able to debug this one unless I get my hands on a windows machine
Thanks @rodriguez-facundo maybe I can try tix this myself. Anyway this is not in the roadmap yet. @tarelli do we want to give priority to this?
Probably not a burning priority but definitely for the roadmap.
Proposal to fix eslint: if geppetto-client is inside node_modules with the latest proposal from Facu that means that gptclient is coming from npm, in that case there's no need to run the linter. If geppetto-client is coming from sources and we need to elint it we'd need to run the linter on the geppetto-client
folder which is a sibling of node_modules. A global ignore of node_modules
in conjunction with linting the gepetto-client folder if this exists should fix the problem.
Once the elint problem is fixed we need someone with a native Windows to try and understand the problem with the build. Maybe @jrmartin can give this a try after the tests.
I tested this on Windows and there's no eslint errors. I used geppetto-application branch feature/19 with 'development' for geppetto-client.
However, there are more errors during the mvn clean install
This one I used to get every single time a couple of years ago when I was on Windows, only solution I found back then was to replace ${useSsl} and ${embedded} to boolean 'false'.
Once passed this error, I get the other errors Filippo has reported in this card.
Haven't spent much time attempting to find fixes, work in progress.
Fixed the issue on windows, the problem (with npm build) was with one of the URL/paths used in webpack.config.js . In windows, the path had backward slashes, changing them to forward slashes fixes the build. The UR/Path causing the trouble was the one pointing to the CSS files.
Also, another error happening in windows, was in the pom.xml. During the build, it was trying to access properties 'useSSL, embedded and embedderURL', which are in GeppettoConfiguration.json . If the gepeptto configuration json doesn't have any values for these variables during the windows installation, the installation breaks since these variable will be null, in UNIX this is not an issue. To get around it, these properties are declared in the pom.xml as part of the
Opened PRs with the changes.
PR in geppetto-application with webpack.config.js change: https://github.com/openworm/geppetto-application/pull/33
PR in org.geppetto.frontend with pom.xml change https://github.com/openworm/org.geppetto.frontend/pull/892
The build fails on windows with the following error:
2019-07-31T10_18_08_871Z-debug.log