package.json: "main": "htttp://localhost"
The html file is loaded from the server. require('nw.gui') cause an error 'require is not defined'.
However, this error would not appear when this html file is loaded from local directory.
Sounds like a case of #199 ?
I think it's just a case of not having specified a node-remote key in your manifest. For example:
{
"name": "your-nwjs-app",
"main": "http://localhost/",
"node-remote": "localhost"
}
:warning: DANGER: This grants sources matching the specified node-remote pattern node-level execution privileges. You should be as specific as possible when constructing such patterns.
@rdtsc , many thanks for your help! I just try and succeed.
Most helpful comment
I think it's just a case of not having specified a
node-remotekey in your manifest. For example:package.json
:warning: DANGER: This grants sources matching the specified
node-remotepattern node-level execution privileges. You should be as specific as possible when constructing such patterns.