nw-builder: nwbuild reads package.json from ANYWHERE, including dependencies (regression, breaking)
Issue Type
- Bug
- Feature
- Other
Current/Missing Behaviour
I pointed out the issue here: https://github.com/nwutils/nw-builder/pull/600#pullrequestreview-1101841243 And guess what? It found a malformed package.json in some random dependency, breaking the whole pipeline.
Expected/Proposed Behaviour
nwbuild must not use just any package.json
. It must use the one placed in the root of the input directory.
Additional Info
- Regression from v3.5.7
- Operating System: any OS
- Node version: v18+
- NW.js version: doesn’t matter
- Repro link:
- …
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (4 by maintainers)
This has been fixed and released in v3.8.6.
@CosmoMyzrailGorynych Based on the error you have to, try unsetting
nwSource
andnwManifest
. If that doesn’t work then try explicitly settingnwSource=https://dl.nwjs.io
andnwManifest=https://nwjs.io/versions.json
.Maybe better not to try to guess things and do as @ayushmxn’s idea and look for
package.json
in the input directory, even perhaps with an explicit option.