-
-
Notifications
You must be signed in to change notification settings - Fork 13
productionMode not working in RC8 - Windows #207
Comments
Hi Tony, thanks for the thorough walk trough of the issue! I tried to reproduce the issue in Windows 10 with both PowerShell and Command Prompt and it seemed to resolve the paths correctly and build the es5/es6 frontend folders. I also tested git bash and it seemed to work ok as well. However, since it is a emulated environment I would not recommend running in it as I don't know how well Gradle works in that and it might trigger some hard to solve issues where Gradle thinks its running on Unix. The only advice I can give you is try to run on PowerShell and see if you get the same result? Since Windows isn't my daily OS maybe I'm missing something obvious as well :) |
Hi John,
It's definitely an OS-specific issue. (My environment is on "Windows Server 2008 R2").
|
Some more information after further experimentation with git bash vs regular windows command line. I may have mis-interpreted the failure and incorrectly assumed that it had something to do with properly quoted paths. Attached please find the execution result of the following command: In this file it shows that at least one yarn command seems to be executing just fine. What am I missing? |
It is not really Yarn that is failing for you, it is the polymer CLI command:
That should create the frontend es5/es6 directories, but it is claiming it succeeded even though it did not do anything. Here is the correct output from it from when it is working: yarn run v1.12.3
$ ./node_modules/polymer-cli/bin/polymer.js build --npm --module-resolution=node
info: Clearing build/ directory...
info: (frontend-es6) Building...
info: (frontend-es5) Building...
info: (frontend-es6) Build complete!
info: (frontend-es5) Build complete!
Done in 42.00s. The Polymer CLI has this bug where it successfully completes when bundling even though it failed somewhere internally. Usually it has to do with wrong relative paths in the templates (as discovered here #147). You could try to create a simple app with Of course it can also be something related to polymer.js not resolving correctly the paths on Windows Server 2008 which starts to be quite old. |
The sample run that I am sharing is produced from the myapp generated by vaadinCreateProject. so I think that means that the issue is environment specific on my server. I will try to dig into polymer.js |
@corinara I split your issue out of this issue into its own issue as it is most likely not related. |
Desktop (please complete the following information):
Describe the bug
I am running into several issues using the "Getting started (no IDE)" sample and turning on productionMode. First, I am following the instructions and I am able to run "gradle jettyRun". Behavior is as expected without any issues. As soon as I specify productionMode = true, I am starting to deal with a cascading set of problems that I will try to describe below
Problem 1.
gradle vaadinTranspileDependencies --info --stacktrace
produces
In order to proceed, I create the requested folder by hand and re-run the command
Problem 2.
It's not immediately obvious what went wrong here, but some more digging explains that the issue is caused by the plugin throwing the exception when it does not find the frontend-es5 folder that was supposed to be generated by the yarn command. Conveniently the command is available in the console, so, next, I turn my attention to it and attempt to run it manually as follows:
"C:\Users\aoganesi\Documents\workspace\myapp\.gradle\yarn\yarn-v1.12.3\yarn.cmd" --prefer-offline --cwd C:\Users\aoganesi\Documents\workspace\myapp\build\frontend run polymer build --npm --module-resolution=node
. (Note that I added double quotes around the yarn.cmd to be able to run it from git bash) which results in the following response.This leads me to believe that something is not right with paths to nodejs that was auto-downloaded by Gradle or the plugin (I am a bit out of my depth here, because I don't exactly understand which part of the infrastructure is responsible for downloading and installing nodejs/yarn). I decided that the path of least resistance for me at this point is to download and install both tools manually and make sure that they are available in the path.
if I re-run the command adding double-quotes around the path parameter everything works as follows
At this point I am not really sure how to proceed. The issue seems to be OS/path related (possibly plugin is not calling yarn commands with quotes) or it's possible that I am just missing some simple bit of understanding that would have saved me a ton of grief.
Thank you very much for reading through my issue. I would greatly appreciate any pointers in the right direction!
Tony
The text was updated successfully, but these errors were encountered: