Replies: 22 comments 1 reply
-
你electron以及他所带的node版本太低了 |
Beta Was this translation helpful? Give feedback.
-
可以参考一下这个项目 |
Beta Was this translation helpful? Give feedback.
-
我是用的cli add plugin不是init模板,我看了下版本大致差不多啊 "dependencies": {
"@mdi/font": "5.9.55",
"core-js": "^3.6.5",
"material-design-icons-iconfont": "^6.1.0",
"oicq": "^1.17.2",
"register-service-worker": "^1.7.2",
"roboto-fontface": "0.10.0",
"vue": "^2.6.12",
"vue-class-component": "^7.2.6",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.5.1",
"vuetify": "^2.4.0",
"vuex": "^3.6.2"
},
"devDependencies": {
"@types/electron-devtools-installer": "^2.2.0",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-pwa": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-typescript": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0",
"electron": "^13.0.1",
"electron-devtools-installer": "^3.2.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^2.2.1",
"sass": "^1.32.0",
"sass-loader": "^10.0.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"typescript": "~4.1.5",
"vue-cli-plugin-electron-builder": "^2.0.0",
"vue-cli-plugin-vuetify": "^2.4.0",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.0"
} |
Beta Was this translation helpful? Give feedback.
-
electron是最新的版本 |
Beta Was this translation helpful? Give feedback.
-
打印一下运行时的node版本 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
是指electron运行时里的node版本,应该不可能有16那么高 |
Beta Was this translation helpful? Give feedback.
-
运行时的版本咋打印 |
Beta Was this translation helpful? Give feedback.
-
在你的应用程序中打印。不过看了electron13自带的node似乎是14.17,应该没有问题。 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
😂我现在应该怎么排查问题呢 |
Beta Was this translation helpful? Give feedback.
-
不太熟悉electron,参考上面那个项目吧 |
Beta Was this translation helpful? Give feedback.
-
我看不出你的问题所在,多加一些 console.log? |
Beta Was this translation helpful? Give feedback.
-
导入oicq就出错了,日志我贴1楼了 |
Beta Was this translation helpful? Give feedback.
-
我贴了个demo上来 qqplus |
Beta Was this translation helpful? Give feedback.
-
我使用 npx create-electron-app my-new-app --template=typescript-webpack 创建 electron 项目也有类似的错误,貌似在使用 webpack 会发生错误 |
Beta Was this translation helpful? Give feedback.
-
拉了一下你的项目,好像是webpack用js-loader去读取oicq的js,但是好像有些是ts,所以报错了 |
Beta Was this translation helpful? Give feedback.
-
我之前也怀疑过ts的问题 |
Beta Was this translation helpful? Give feedback.
-
我又遇到了奇奇怪怪的问题,吐了 App • ERROR • Renderer in ./node_modules/graceful-fs/graceful-fs.js
Module not found: Can't resolve imported dependency "fs"
Did you forget to install it? You can run: yarn add fs
App • ERROR • Renderer in ./node_modules/jsonfile/index.js
Module not found: Can't resolve imported dependency "fs"
Did you forget to install it? You can run: yarn add fs
App • ERROR • Renderer in ./node_modules/log4js/lib/appenders/fileSync.js
Module not found: Can't resolve imported dependency "fs"
Did you forget to install it? You can run: yarn add fs
App • ERROR • Renderer in ./node_modules/log4js/lib/appenders/tcp.js
Module not found: Can't resolve imported dependency "net"
Did you forget to install it? You can run: yarn add net
App • ERROR • Renderer in ./node_modules/log4js/lib/log4js.js
Module not found: Can't resolve imported dependency "fs"
Did you forget to install it? You can run: yarn add fs
App • ERROR • Renderer in ./node_modules/needle/lib/multipart.js
Module not found: Can't resolve imported dependency "fs"
Did you forget to install it? You can run: yarn add fs
App • ERROR • Renderer in ./node_modules/oicq/lib/client.js
Module not found: Can't resolve imported dependency "fs"
Did you forget to install it? You can run: yarn add fs
App • ERROR • Renderer in ./node_modules/oicq/lib/core/network.js
Module not found: Can't resolve imported dependency "net"
Did you forget to install it? You can run: yarn add net
App • ERROR • Renderer in ./node_modules/oicq/lib/internal/contactable.js
Module not found: Can't resolve imported dependency "fs"
Did you forget to install it? You can run: yarn add fs
App • ERROR • Renderer in ./node_modules/oicq/lib/internal/contactable.js
Module not found: Can't resolve imported dependency "child_process"
Did you forget to install it? You can run: yarn add child_process
App • ERROR • Renderer in ./node_modules/oicq/lib/internal/highway.js
Module not found: Can't resolve imported dependency "net"
Did you forget to install it? You can run: yarn add net
App • ERROR • Renderer in ./node_modules/oicq/lib/message/image.js
Module not found: Can't resolve imported dependency "fs"
Did you forget to install it? You can run: yarn add fs
App • COMPILATION FAILED • Please check the log above for details. |
Beta Was this translation helpful? Give feedback.
-
你是怎么typescript导入oicq的😂 |
Beta Was this translation helpful? Give feedback.
-
使用的协议: 手机(默认)
我已确认过官方客户端不存在此问题,库的行为存在问题。
问题描述
electron报语法错误
详细日志
Beta Was this translation helpful? Give feedback.
All reactions