Closed alabotski closed 5 years ago
beverage-starter-flow-gradle
My error. Html was not in the templates folder
But now I have another problem
Process 'command '/Users/lesharb/workspace/test/.gradle/yarn/yarn-v1.12.3/bin/yarn'' finished with non-zero exit value 1
Try to run gradle with the --info
flag. Issue https://github.com/devsoap/gradle-vaadin-flow/issues/193 might help you.
The bevarage-starter-flow-gradle project's templates (https://github.com/devsoap/examples/blob/master/beverage-starter-flow-gradle/src/main/webapp/frontend/templates/reviews-list.html#L23) depend on the lumo theme.
If you switch the base theme to Material (as you've done above) then you will need to fix the style imports in the templates as well.
I add such configuration
// In production mode we want to exclude the Lumo styles imported from all vaadin components
vaadinTranspileDependencies {
importExcludes = [
/.*[\\\/]theme[\\\/]lumo[\\\/].*/,
/.*[\\\/]vaadin-lumo-styles[\\\/].*/,
]
}
// We don't want the Lumo style Maven dependencies in our project either
configurations.all {
exclude group: 'com.vaadin', module: 'vaadin-lumo-theme'
exclude group: 'org.webjars.bowergithub.vaadin', module: 'vaadin-lumo-styles'
}
And have such result with --info
Found 10 resource imports
Using Material as base theme...
Filtering 60 theme imports...
Found 60 theme imports
Creating vaadin-flow-bundle-78hwllwvplraduyoivgmuyshb.cache.html...
Creating polymer.json...
Creating vaadin-flow-bundle-manifest.json...
Starting process 'command '/Users/lesharb/workspace/test/.gradle/yarn/yarn-v1.12.3/bin/yarn''. Working directory: /Users/lesharb/workspace/test/build/frontend Command: /Users/lesharb/workspace/test/.gradle/yarn/yarn-v1.12.3/bin/yarn --prefer-offline --cwd /Users/lesharb/workspace/test/build/frontend run polymer-bundler --inline-scripts --manifest-out=/Users/lesharb/workspace/test/build/frontend/vaadin-flow-bundle-manifest.json vaadin-flow-bundle-78hwllwvplraduyoivgmuyshb.cache.html
Successfully started process 'command '/Users/lesharb/workspace/test/.gradle/yarn/yarn-v1.12.3/bin/yarn''
Transpiling...
Starting process 'command '/Users/lesharb/workspace/test/.gradle/yarn/yarn-v1.12.3/bin/yarn''. Working directory: /Users/lesharb/workspace/test/build/frontend Command: /Users/lesharb/workspace/test/.gradle/yarn/yarn-v1.12.3/bin/yarn --prefer-offline --cwd /Users/lesharb/workspace/test/build/frontend run polymer build --npm --module-resolution=node
Successfully started process 'command '/Users/lesharb/workspace/test/.gradle/yarn/yarn-v1.12.3/bin/yarn''
error Command failed with exit code 1.
> Task :vaadinTranspileDependencies FAILED
:vaadinTranspileDependencies (Thread[Execution worker for ':' Thread 6,5,main]) completed. Took 37.589 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':vaadinTranspileDependencies'.
> Process 'command '/Users/lesharb/workspace/test/.gradle/yarn/yarn-v1.12.3/bin/yarn'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.3/userguide/command_line_interface.html#sec:command_line_warnings
@johndevs Unfortunately I can not give a project to share, it's commercial development
I have such structure
With --debug
12:19:34.915 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :vaadinTranspileDependencies FAILED
12:19:43.935 [DEBUG] [com.devsoap.vaadinflow.util.LogUtils$LogOutputStream] error: Promise rejection: Error: ENOENT: no such file or directory, open '/Users/lesharb/workspace/test/build/frontend/flowgraph/dist/vendors~main.bundle.js'
12:19:43.935 [DEBUG] [com.devsoap.vaadinflow.util.LogUtils$LogOutputStream]
12:19:43.935 [DEBUG] [com.devsoap.vaadinflow.util.LogUtils$LogOutputStream] error: Error: ENOENT: no such file or directory, open '/Users/lesharb/workspace/test/build/frontend/flowgraph/dist/vendors~main.bundle.js'
12:19:43.935 [DEBUG] [com.devsoap.vaadinflow.util.LogUtils$LogOutputStream]
12:19:43.965 [INFO] [com.devsoap.vaadinflow.util.LogUtils$LogOutputStream] error Command failed with exit code 1.
12:19:43.965 [INFO] [com.devsoap.vaadinflow.util.LogUtils$LogOutputStream]
12:19:43.965 [DEBUG] [com.devsoap.vaadinflow.util.LogUtils$LogOutputStream] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
12:19:43.965 [DEBUG] [com.devsoap.vaadinflow.util.LogUtils$LogOutputStream]
12:19:43.972 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
Where should JS files be located?
In production mode
Files from the styles and templates folders
The rest are simply ignored. How I can include them?
I can't build production mode =(((
Try use lumo but some result
Standard templates are not loaded.