nwjs调用dll,require('ref'),TypeError: Cannot read property
项目中我是想使用ffi来调用ddl,往项目中加了ffi ref模块,并使用nw-gyp rebuild了:
rebuild ref:
rebuild ffi:
但当我要引入ref和ffi是就会报这个错,请问这个是什么引起的?
Uncaught TypeError: Cannot read property 'indexOf' of undefined
getFileName @ bindings.js?dfc1:178
bindings @ bindings.js?dfc1:82
(anonymous function) @ ref.js?0e66:5
(anonymous function) @ app.js:1
环境:
node:v10.15.2-x64(也试过v8.17.0-x64,构建时没区别)
系统:win10 64位
nw.js:0.14.7
python:2.7
vs:2015
package.json:
"dependencies": {
"@babel/runtime": "^7.6.0",
"axios": "0.18.0",
"echarts": "^4.2.1",
"element-ui": "^2.13.1",
"ffi": "^2.3.0",
"js-cookie": "2.2.0",
"moment": "^2.26.0",
"node-webkit-updater": "^0.3.3",
"normalize.css": "8.0.1",
"nprogress": "0.2.0",
"nw": "0.14.7-sdk",
"path-to-regexp": "6.1.0",
"ref": "^1.3.5",
"ref-array": "^1.2.0",
"vue": "2.6.11",
"vue-count-to": "^1.0.13",
"vue-router": "3.0.6",
"vuex": "3.1.0"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/plugin-syntax-dynamic-import": "^7.6.0",
"@babel/plugin-transform-runtime": "^7.6.0",
"@babel/preset-env": "7.3.1",
"autoprefixer": "^6.7.2",
"babel-eslint": "7.2.3",
"babel-helper-vue-jsx-merge-props": "2.0.0",
"babel-loader": "^8.0.6",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-es2015-node6": "^0.4.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^6.0.3",
"css-loader": "^0.26.1",
"eslint": "^3.14.1",
"eslint-config-standard": "^6.2.1",
"eslint-friendly-formatter": "^2.0.7",
"eslint-loader": "2.1.2",
"eslint-plugin-html": "^2.0.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^6.0.0",
"friendly-errors-webpack-plugin": "^1.1.3",
"html-webpack-plugin": "3.2.0",
"http-proxy-middleware": "^1.0.4",
"iconv-lite": "^0.4.15",
"innosetup-compiler": "^5.5.9",
"nw-builder": "^3.5.7",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"ora": "^1.1.0",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"url-loader": "^4.1.0",
"vue-loader": "^15.7.0",
"vue-style-loader": "^2.0.0",
"vue-template-compiler": "2.6.11",
"webpack": "^4.43.0",
"webpack-bundle-analyzer": "^3.8.0",
"webpack-dev-middleware": "^3.7.2",
"webpack-hot-middleware": "^2.16.1",
"webpack-merge": "^4.2.2",
"webpack-node-externals": "^1.7.2"
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论