You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 4, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 4, 2023. It is now read-only.
ERROR in ./node_modules/conf/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/dingzesen/Desktop/elephant_sh/node_modules/conf'
@ ./node_modules/conf/index.js 3:11-24
@ ./node_modules/electron-store/index.js
@ ./node_modules/vuex-electron/dist/persisted-state.js
@ ./node_modules/vuex-electron/dist/index.js
@ ./src/renderer/store/index.js
@ ./src/renderer/main.js
ERROR in ./node_modules/electron/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/dingzesen/Desktop/elephant_sh/node_modules/electron'
@ ./node_modules/electron/index.js 1:9-22
@ ./node_modules/vuex-electron/dist/shared-mutations.js
@ ./node_modules/vuex-electron/dist/index.js
@ ./src/renderer/store/index.js
@ ./src/renderer/main.js
ERROR in ./node_modules/graceful-fs/graceful-fs.js
Module not found: Error: Can't resolve 'fs' in '/Users/dingzesen/Desktop/elephant_sh/node_modules/graceful-fs'
@ ./node_modules/graceful-fs/graceful-fs.js 1:9-22
@ ./node_modules/write-file-atomic/index.js
@ ./node_modules/conf/index.js
@ ./node_modules/electron-store/index.js
@ ./node_modules/vuex-electron/dist/persisted-state.js
@ ./node_modules/vuex-electron/dist/index.js
@ ./src/renderer/store/index.js
@ ./src/renderer/main.js
ERROR in ./node_modules/make-dir/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/dingzesen/Desktop/elephant_sh/node_modules/make-dir'
@ ./node_modules/make-dir/index.js 2:11-24
@ ./node_modules/conf/index.js
@ ./node_modules/electron-store/index.js
@ ./node_modules/vuex-electron/dist/persisted-state.js
@ ./node_modules/vuex-electron/dist/index.js
@ ./src/renderer/store/index.js
@ ./src/renderer/main.js
ERROR in ./node_modules/path-exists/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/dingzesen/Desktop/elephant_sh/node_modules/path-exists'
@ ./node_modules/path-exists/index.js 2:11-24
@ ./node_modules/locate-path/index.js
@ ./node_modules/find-up/index.js
@ ./node_modules/pkg-up/index.js
@ ./node_modules/conf/index.js
@ ./node_modules/electron-store/index.js
@ ./node_modules/vuex-electron/dist/persisted-state.js
@ ./node_modules/vuex-electron/dist/index.js
@ ./src/renderer/store/index.js
@ ./src/renderer/main.js
一直报错,应该是fs用不了,所以我就在webpack.web.config.js中添加了node:{fs:'empty'},之后不报错了,但是打包后打开网页出现这个问题:Uncaught TypeError: n.existsSync is not a function,这个问题应该是获取fs为空,所以找不到,那这个fs的问题怎么解决呢?
谢谢了昂,按照#751的方法,在build:web环境下排除【electron-vuex】之后,$ yarn run build:web 能够正常打包,且 index.html 文件能 正常运行不报错 了。
Thank you, follow the #751 method, after the exclusion of [electron-vuex] in the build: web environment, $ yarn run build: web can be packaged normally, and the index.html file can run normally without error.
Activity
dingzesen commentedon Apr 22, 2019
问题解决了 详细看#751
hanshou101 commentedon Jun 19, 2019
谢谢了昂,按照#751的方法,在build:web环境下排除【electron-vuex】之后,$ yarn run build:web 能够正常打包,且 index.html 文件能 正常运行不报错 了。
Thank you, follow the #751 method, after the exclusion of [electron-vuex] in the build: web environment, $ yarn run build: web can be packaged normally, and the index.html file can run normally without error.