Closed manolo closed 8 months ago
I had a different problem, but found this because I got the same dumped stack trace. It didn't help that none of it was my code, but what did help was going into my node_modules at the first entry point in that dump.
at error (file:///private/tmp/tmp/observability-kit/observability-kit-demo/node_modules/rollup/dist/es/shared/parseAst.js:337:30)
I opened here, and just logged what was passed into it.
Rerun the build, and now you get more information.
After doing this, I ran the build and it took me to a place in my own code and I could fix it. It turned out I had a .js file with some JSX in it. I just needed to rename the extension to .jsx and the problem went away.
Thank for your tip, seems that the error is in this external component
code: 'PARSE_ERROR',
id: '/private/tmp/o11y/observability-kit/observability-kit-demo/node_modules/@vaadin-component-factory/vcf-nav/src/vcf-nav.ts',
message: 'Expression expected (Note that you need plugins to import files that are not JavaScript)',
This is an issue in vcf-nav
indeed.
These two changes solves this problem for me:
Update vcf-nav
version in the demo module to 1.1.2
(latest)
@NpmPackage(value = "@vaadin-component-factory/vcf-nav", version = "1.1.2")
public class Application implements AppShellConfigurator {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
2. Remove `.js` extensions to solve next error:
Could not resolve "./src/vcf-nav-item.ts" from "node_modules/@vaadin-component-factory/vcf-nav/vcf-nav.js
Comitted here https://github.com/vaadin/vcf-nav/commit/1999dc23faa33bbabb8c9526c09cf0b919a1ce7e.
The demo module then starts fine for me. It, however, says that Observability agent is not running, but this is another thing.
@chrisbeaver thanks a lot for your tip. You saved hours of investigation time for us 👍
@mshabarov No problem! I'm glad I could help.
I'd recommend to migrate this demo module to Side Nav component, which is well maintained.
Fixed in https://github.com/vaadin/observability-kit/pull/244 that have the migration to side-nav
Description of the bug
When running the observability flow demo with 24.4 it raises a frontend compilation error:
Expected behavior
demo does not fail
Minimal reproducible example
Versions