I'm new to NW.js but my debut project was quite a walk-through until I got to Production and got stuck. I've tried Google search, but to no avail.
On my package.json file, I have:
... "scripts": { "dev": "nw source/", "prod": "nwbuild source/ --mode run -p win64 --buildDir dist/" },
npm run dev works, but npm run prod fails with following error message:
[ ERROR ] 2023-01-28T12:38:42.542Z package.json not found in srcDir file glob patterns
Also, used the CLI to try the command: npm nwbuild ./ --mode=run --version=latest --flavor=sdk, but with no result, except that the version number (9.3.1), was returned.
Checked this forum and some others, for similar issues. Though nothing specific enough found, but I tried all related advice and suggestions. This included Node-js and NW.js versions tweaks and changes in settings but no success yet.
I need something more specific to the error message:
[ ERROR ] 2023-01-28T12:38:42.542Z packeage.json not found in srcDir file glob patterns
Same error message mostly persisted:
OS is Windows 11, and Windows 10 also.
nw-builderuses file globbing (as of v4.0.9). Thepackage.json not found in srcDir file glob patternserror usually occurs when an incorrect globbing pattern has been used. You can try changing the command to (or something similar):It requires a globbing pattern since it needs to find a valid
package.jsonbefore running or building the application.