@girish said in Maintaining package.json across updates:
Is this behavior intentional or should we fix
--package to remove extra deps?
This should be fixed. Can you open an issue on GitHub? I think it should be possible to only merge forward packages starting with
If not, how do I remove
json-2-csv from package.json? Of course, I can npm uninstall the modules which are now gone in the newer NodeBB version manually but this means I have to manually diff package.json for every NodeBB upgrade (the situation I was trying to avoid in my first post).
If you wish to do this manually, I'd suggest you instead just copy
package.json and then run
npm install [packages...] for any plugins you need. Active plugins listed under
Having stale things in package.json is harmless but the issue is NodeBB does a dep check on startup (and
json-2-csv is not installed).
If it's in package.json, it should be installed. In what cases would there be a package specified as a dependency in package.json but that package not be installed? Uninstalling a package via npm should remove that package from the dependencies. This is the case in any recent version of npm.
A related issue: I found the flag
dep-check to skip the dep check on start up. ... Effectively, I don't know how to pass no-dep-check via loader.js.
You should be able to set
"dep-check": false in config.json