In my tauri.conf.json file, I have the following configuration:
"bundle": {
"createUpdaterArtifacts": true,
"windows": {
"nsis": {
"template": "installer.nsi",
"installMode": "perMachine"
}
},
"active": true,
"targets": "all",
"icon": ["icons/favicon.ico"],
"resources": ["installer.nsi"]
}
And installer.nsi file have in same directory as tauri.conf.json.
When I try to build the project using the command npm run tauri build, I get the following error:
failed to bundle project: The system cannot find the file specified. (os error 2)
Error [tauri_cli_node] failed to bundle project: The system cannot find the file specified. (os error 2)
It seems like this issue occurs when using the "template": "installer.nsi" property.
How can I resolve this error? What could be causing it?
Example: