My source folder is /dist, and I want to run a NW.js script in /tool/nw.js. Why does it throw the glob pattern error about not finding the srcDir (/dist) folder? It works when using glob:false in the config but I want to know why the srcDir: "../dist" is wrong.
My folder structure
/
/build
/dist
/html
package.json
/tool
run.js
/tool/run.js
await nwbuild({
platform: "linux",
arch: "x64",
srcDir: "../dist",
outDir: "../build/linux64",
glob: true // true by default
});
process.cwd()). If you are using common js (requireinstead ofimport), then you could useconst path = require('path');andpath.join(__dirname, '../dist')to make the path relative to the current file.