简体   繁体   中英

Uncaught Error: EPERM: operation not permitted, write

I am working with Electron, trying to create a simple example app to view a local sqlite database file. I'm using sql.js and just using their example for connecting to a local database file, but I keep running into issues. My app works just fine on mac, but when I try to run the exe on windows, I get the following error:

Uncaught Error: EPERM: operation not permitted, write

I have an index.html, main.js, and app.js files. The main.js file opens the index.html file and the html file runs functions specific to the db in the app.js file.

I am using virtualbox running windows 7 for my testing environment for windows. I'm not sure if I'm even headed in the right direction with this approach. I'm using node v5.0.0, npm v3.3.9, electron v0.34.0, and sql.js v0.2.21.

Any feedback including alternatives would be greatly appreciated. I'm trying to avoid localstorage and indexeddb for specific personal reasons. Also, this is my first question to ask, so I apologize if I leave something out.

我从谷歌快速搜索中得到的大部分回复对我不起作用,然后我记得我刚刚在 Windows 安全中的勒索软件保护中打开了受控文件夹访问,将其关闭为我修复了它

This seems to be a common bug in Node applications. Using Windows Explorer try navigating to

%USERPROFILE%\\.config\\configstore

and deleting all the .yml files like "bower-github.yml" As they are usually autogenerated when you run the app. Take a backup of the "configstore" folder in case you are unsure of deleting them.

Source: EPERM, operation not permitted error, config store

同时,您应该尝试在不同于 C 的分区上重新安装您的应用程序:一,我针对我的情况进行了尝试,并且成功了!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM