0
我正在創建一個運行從create-react-app生成的響應的電子。然後我添加nedbjs(一個持久性數據庫)和camojs(ODM for nedb)作爲依賴。連接反應與nedb我使用電子ipc。如何將文件夾和文件添加到使用電子構建器的電子版本中
這裏是我的項目結構:
這裏是我的package.json:
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"electron-dev": "concurrently \"cross-env BROWSER=none yarn start\" \"wait-on http://localhost:3000 && electron .\"",
"electron-pack": "build --em.main=build/electron.js",
"electron-release": "build --em.main=build/electron.js --publish=always",
"preelectron-pack": "yarn build",
"preelectron-release": "yarn build"
},
"build": {
"appId": "com.example.cra-electron-boilerplate",
"files": [
"build/**/*",
"node_modules/**/*",
"package.json"
],
"directories": {
"buildResources": "assets"
},
"publish": {
"provider": "github"
}
},
我用命令紗電子包裝來包裝我的應用程序。然後運行從DIST文件夾解壓的可執行文件,然後得到這個錯誤:
這裏是my repo
你的IDE看上去很美 –
@CommercialSuicide謝謝。它的Atom,安裝了文件圖標包。 –