'Missing permission to execute the native method: filesystem.readFile
I'm new in NeutralinoJS, I'm trying my first app and I need to read the content of a json file. I'm trying by using Neutralino.filesystem.readFile method, but it fails with error
{
code: "NE_RT_NATPRME",
message: "Missing permission to execute the native method: filesystem.readFile"
}
I've tried also by reading the status of the file with filesystem.getStats but it fails with the same error. How can I activate the permissions to run filesystem.readFile and other filestystem method?
Solution 1:[1]
I was actually just coming across this same problem. Make sure in your neutralino.config.json you have filesystem.* in your nativeAllowList section like so:
"nativeAllowList": [
"app.*",
"os.*",
"filesystem.*",
"debug.log"
],
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | spikehd |
