Using AppNav in an existing project

I am trying to use the AppNav component in an existing project that I’m working on. I got the java classes from the vaadin start page but I can’t seem to get the node module installed. I changed the package.json file and ran npm install which added the files but as soon as I run the application it changes the json file and removes the folder from node_modules.

Is there something I’m missing?

Hi! I’ve never used it (only saw in the my-app demo application), but do you have a
@NpmPackage(value = "@vaadin-component-factory/vcf-nav", version = "1.0.6")
annotation on your own AppShellConfigurator class?

Do you use Spring Boot? If so what does your custom AppShellConfigurator class look like?

Which version of Vaadin do you use?

Changing the package.json file by hand or running npm in a flow project is wrong. Flow is going to remove all dependencies it doesn’t know. Like described by Károly make sure you have added the NpmPackage on a class that is scanned by the application (normally in a package below your in Spring Boot) and it’s picked up automatically on start

Adding the NpmPackage tag worked

Thank you both!