Content
Adding npm dependencies to plugin
Added by Kevin Staples over 3 years ago
Hello,
I´m developing a plugin in order to pull and view changelists from a perforce server.
Additionally I want to provide the feature to show a file from the changelist and view the differences from the changelist revision and the previous one.
My plugin is based on an Rails engine extended with Angular, just like the openproject-proto_plugin.
I thought about using the ngx-text-diff package (https://www.npmjs.com/package/ngx-text-diff) in an Angular component.
I tried to add the package to my plugins package.json dependencies, but it is not getting installed when running the 'npm install' command in my OpenProject core directory and on assets:precompile i´m getting the error, that the module can´t be loaded.
I also tried to install it on my deb package based installation of OpenProject, but I´m getting the same errors as in my dev environment.
Is there anything further that I have to do, when adding npm packages to a plugin?
Greetings
Kevin