Npm plugin deficiencies that make it almost useless for larger projects

The npm plugin does not run any build scripts defined in the package.json by default and does not provide any way of indicating which scripts to run (and also without any ordering of those scripts)

The npm plugin configured to download nodejs does the download at the build step which is unexpected - developers expect node to be pulled by the pull steps

Because the npm plugin downloads node during the build step a snap author cannot override the build step to run the scripts they need to run from the package.json before calling snapcraftctl default. This means they cannot run build scripts at all because node and npm don’t exist until the default action has been run and after running the default action the node project has been npm pack and so the assets built after the default action are ignored.

i have stopped long ago using the npm plugin due to its deficiencies and found using the nil plugin together with using nodejs as stage and build snap is a way more effective solution and causes less hassle …

1 Like

This is why we badly need user-defined plugins back in core22.