Open mcooper7290 opened 3 years ago
Ignore build-stacktrace.txt - that's the wrong file. Here is the correct build with stacktrace. build-stacktrace2.txt
I fixed my issue by deleting all the project .js and node_modules/ files. It would be nice if the exception was caught and output the name of the file it can't parse.
From the stacktrace
Caused by: elemental.json.JsonException: Invalid object:
at elemental.json.impl.JsonTokenizer.parseObject(JsonTokenizer.java:275)
at elemental.json.impl.JsonTokenizer.nextValue(JsonTokenizer.java:173)
at elemental.json.impl.JsonTokenizer.parseObject(JsonTokenizer.java:231)
at elemental.json.impl.JsonTokenizer.nextValue(JsonTokenizer.java:173)
at elemental.json.impl.JsonTokenizer.parseObject(JsonTokenizer.java:231)
at elemental.json.impl.JsonTokenizer.nextValue(JsonTokenizer.java:173)
at elemental.json.impl.JreJsonFactory.parse(JreJsonFactory.java:64)
at elemental.json.Json.parse(Json.java:53)
at com.vaadin.flow.server.frontend.NodeUpdater.getJsonFileContent(NodeUpdater.java:209)
at com.vaadin.flow.server.frontend.NodeUpdater.getPackageJson(NodeUpdater.java:192)
at com.vaadin.flow.server.frontend.TaskCreatePackageJson.execute(TaskCreatePackageJson.java:47)
it can be seen that Vaadin is trying to parse the package.json
and is failing for some reason. I'm guessing that the file must have had some funny non-JSON contents for some reason.
However, certainly Vaadin should have reported this error in a much more cleaner way. Could you please open a bug report at https://github.com/vaadin/flow/issues in this regard?
Reported upstream: https://github.com/vaadin/flow/issues/10323
Desktop (please complete the following information):
Describe the bug When building target 'vaadinPrepareFrontend' the build fails with Invalid object:
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':WebApp:vaadinPrepareFrontend'.
Try: ....
This occurs when running 'gradle --stop; gradle clean assemble vaadinPrepareFrontend'
The same command with --stacktrace is attached.
build-stacktrace.txt
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.