- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用一个名为 gulp-xml-editor 的模块它使用 libxmljs 。在 Mac 上一切正常,但当我在 Windows 机器上尝试时,我得到:“无法找到绑定(bind)文件”,指的是 libxmljs 的绑定(bind)依赖项:
C:\HiddenPath\App Source>gulp clean
C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\node_modules\bindings\bindings.js:91
throw err
^
Error: Could not locate the bindings file. Tried:
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\build\xmljs.node
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\build\Debug\xmljs.node
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\build\Release\xmljs.node
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\out\Debug\xmljs.node
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\Debug\xmljs.node
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\out\Release\xmljs.node
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\Release\xmljs.node
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\build\default\xmljs.node
 C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\compiled\0.12.7\win32\ia32\xmljs.node
at bindings (C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\node_modules\bindings\bindings.js:88
:9)
at Object.<anonymous> (C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\lib\bindings.js:1:99)
at Module._compile (module.js:460:26)
at Module._extensions..js (module.js:478:10)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\HiddenPath\App Source\node_modules\babel\node_modules\babel-core\lib\api\register\node.js:214:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\index.js:4:16)
设置为:
libxmljs\build\
中唯一的文件是 config.gypi
(这看起来很奇怪,因为我的 Mac 上有更多文件)。
早些时候我遇到了不同的错误。首先,libxmljs 根本找不到“绑定(bind)”模块 - 可能是因为它的“npm install”失败了。尝试npm install
它直接给出了 ETIMEOUT
上node-gyp rebuild
。重新安装node-gyp和/或安装Python v2.7(而不是v3)修复了这个问题。现在npm install
除了一些警告之外,似乎工作正常:
C:\HiddenPath\App Source>npm install
npm WARN package.json HiddenAppName@0.2.0 No license field.
> libxmljs@0.14.2 install C:\HiddenPath\App Source\node_modules\libxmljs
> node-gyp rebuild
C:\HiddenPath\App Source\node_modules\libxmljs>if
not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modul
es\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )
else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
buf.c
catalog.c
chvalid.c
dict.c
..\..\..\vendor\libxml\dict.c(173): warning C4244: 'function' : conversion from
'time_t' to 'unsigned int', possible loss of data [C:\HiddenPath\App Source\node_modules\libxmljs\build\vendor\libxml\libxml.v
cxproj]
..\..\..\vendor\libxml\catalog.c(977): warning C4013: 'open' undefined; assumin
g extern returning int [C:\HiddenPath\App Source
\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
..\..\..\vendor\libxml\catalog.c(998): warning C4013: 'read' undefined; assumin
g extern returning int [C:\HiddenPath\App Source
\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
..\..\..\vendor\libxml\catalog.c(999): warning C4013: 'close' undefined; assumi
ng extern returning int [C:\HiddenPath\App Sourc
e\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
..\..\..\vendor\libxml\dict.c(237): warning C4018: '>' : signed/unsigned mismat
ch [C:\HiddenPath\App Source\node_modules\libxml
js\build\vendor\libxml\libxml.vcxproj]
..\..\..\vendor\libxml\dict.c(305): warning C4018: '>' : signed/unsigned mismat
ch [C:\HiddenPath\App Source\node_modules\libxml
js\build\vendor\libxml\libxml.vcxproj]
encoding.c
..\..\..\vendor\libxml\buf.c(674): warning C4028: formal parameter 1 different
from declaration [C:\HiddenPath\App Source\node_
modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
entities.c
error.c
globals.c
hash.c
HTMLparser.c
HTMLtree.c
legacy.c
list.c
parser.c
parserInternals.c
pattern.c
relaxng.c
SAX2.c
SAX.c
tree.c
threads.c
uri.c
valid.c
xinclude.c
xlink.c
xmlIO.c
xmlmemory.c
xmlmodule.c
xmlreader.c
xmlregexp.c
xmlsave.c
..\..\..\vendor\libxml\xmlIO.c(668): warning C4133: 'function' : incompatible t
ypes - from 'stat *' to '_stat64i32 *' [C:\Users\Pebble Code\Documents\ByBox Er
skine\App Source\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
..\..\..\vendor\libxml\xmlIO.c(736): warning C4996: 'GetVersionExA': was declar
ed deprecated [C:\HiddenPath\App Source\node_mod
ules\libxmljs\build\vendor\libxml\libxml.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433)
: see declaration of 'GetVersionExA'
xmlschemas.c
..\..\..\vendor\libxml\xmlIO.c(822): warning C4013: 'read' undefined; assuming
extern returning int [C:\HiddenPath\App Source\n
ode_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
..\..\..\vendor\libxml\xmlIO.c(843): warning C4013: 'write' undefined; assuming
extern returning int [C:\HiddenPath\App Source\
node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
xmlschemastypes.c
..\..\..\vendor\libxml\xmlIO.c(861): warning C4013: 'close' undefined; assuming
extern returning int [C:\HiddenPath\App Source\
node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
..\..\..\vendor\libxml\xmlIO.c(3811): warning C4013: 'getcwd' undefined; assumi
ng extern returning int [C:\HiddenPath\App Sourc
e\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
..\..\..\vendor\libxml\xmlIO.c(3811): warning C4047: '!=' : 'int' differs in le
vels of indirection from 'void *' [C:\HiddenPath\App Source\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
xmlstring.c
xmlunicode.c
xmlwriter.c
xpath.c
xpointer.c
c:\users\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(71): warning C4028: formal parameter 1 different from de
claration (..\..\..\vendor\libxml\xpath.c) [C:\HiddenPath\App Source\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(74): warning C4244: 'initializing' : conversion from 'co
nst uint64_t' to 'const int', possible loss of data (..\..\..\vendor\libxml\xpa
th.c) [C:\HiddenPath\App Source\node_modules\lib
xmljs\build\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(185): warning C4244: 'function' : conversion from 'int64
_t' to 'const size_t', possible loss of data (..\..\..\vendor\libxml\xpath.c) [
C:\HiddenPath\App Source\node_modules\libxmljs\b
uild\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(334): warning C4244: 'function' : conversion from 'const
int64_t' to 'const size_t', possible loss of data (..\..\..\vendor\libxml\xpat
h.c) [C:\HiddenPath\App Source\node_modules\libx
mljs\build\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(340): warning C4244: 'function' : conversion from 'const
int64_t' to 'size_t', possible loss of data (..\..\..\vendor\libxml\xpath.c) [
C:\HiddenPath\App Source\node_modules\libxmljs\b
uild\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(364): warning C4244: 'function' : conversion from 'const
int64_t' to 'size_t', possible loss of data (..\..\..\vendor\libxml\xpath.c) [
C:\HiddenPath\App Source\node_modules\libxmljs\b
uild\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(469): warning C4244: 'function' : conversion from 'int64
_t' to 'const size_t', possible loss of data (..\..\..\vendor\libxml\xpath.c) [
C:\HiddenPath\App Source\node_modules\libxmljs\b
uild\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(470): warning C4244: 'function' : conversion from 'int64
_t' to 'const size_t', possible loss of data (..\..\..\vendor\libxml\xpath.c) [
C:\HiddenPath\App Source\node_modules\libxmljs\b
uild\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(471): warning C4244: 'function' : conversion from 'int64
_t' to 'const size_t', possible loss of data (..\..\..\vendor\libxml\xpath.c) [
C:\HiddenPath\App Source\node_modules\libxmljs\b
uild\vendor\libxml\libxml.vcxproj]
c:\hiddenpath\app source\node_modules\libxmljs\v
endor\libxml\timsort.h(480): warning C4244: 'function' : conversion from 'int64
_t' to 'const size_t', possible loss of data (..\..\..\vendor\libxml\xpath.c) [
C:\HiddenPath\App Source\node_modules\libxmljs\b
uild\vendor\libxml\libxml.vcxproj]
libxml.vcxproj -> C:\HiddenPath\App Source\nod
e_modules\libxmljs\build\Release\\libxml.lib
libxmljs.cc
xml_attribute.cc
xml_document.cc
xml_element.cc
xml_comment.cc
xml_namespace.cc
xml_node.cc
xml_sax_parser.cc
xml_syntax_error.cc
xml_xpath_context.cc
Creating library C:\HiddenPath\App Source\n
ode_modules\libxmljs\build\Release\xmljs.lib and object C:\HiddenPath\App Source\node_modules\libxmljs\build\Release\xmljs.
exp
Generating code
Finished generating code
xmljs.vcxproj -> C:\HiddenPath\App Source\node
_modules\libxmljs\build\Release\\xmljs.node
npm WARN prefer global node-gyp@2.0.2 should be installed with -g
npm WARN unmet dependency C:\HiddenPath\App Sourc
e\node_modules\jest-cli\node_modules\istanbul\node_modules\handlebars\node_modul
es\uglify-js requires async@'~0.2.6' but will load
npm WARN unmet dependency C:\HiddenPath\App Sourc
e\node_modules\jest-cli\node_modules\istanbul\node_modules\async,
npm WARN unmet dependency which is version 1.4.2
npm WARN unmet dependency C:\HiddenPath\App Sourc
e\node_modules\jest-cli\node_modules\istanbul\node_modules\handlebars\node_modul
es\uglify-js requires optimist@'~0.3.5' but will load
npm WARN unmet dependency C:\HiddenPath\App Sourc
e\node_modules\jest-cli\node_modules\optimist,
npm WARN unmet dependency which is version 0.6.1
C:\HiddenPath\App Source>
最佳答案
原来我只需要清除 node_modules
并执行干净的 npm install
!
(我以为我已经这样做了,但这是因为我不习惯 Windows,并且没有意识到 del
并没有删除目录!然后我遇到了文件名太长的问题,但已通过此解决:https://superuser.com/questions/78434/how-to-delete-directories-with-path-names-too-long-for-normal-delete)
关于node.js - libxmljs "could not locate the bindings file"错误(Windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32207570/
我正在尝试在 python 中编写正则表达式来查找目录路径:我的文本如下所示: text = "The public disk is: \\\\diskA\\FolderB\\SubFolderC\\
我想写一个LocationListener,它把最近最精确的位置作为它的位置。我打算在我的 LocationListener 中使用此代码: @Override public void
我想建立一个有光泽和 plotly 的交互式图表。 Shiny 有一个内置功能来获取有关用户交互的信息。比如:input$plot_click、input$plot_dblclick、input$pl
我正在使用 MobileFirst 提供的 WL.Device.Geo.acquirePosition(onGeoLocationSuccess, onGeoLocationFailure, opti
我最近开始使用 ionic 框架,它里面有 angular js。为了在屏幕之间导航,我使用了 $location.path 并且效果很好。但是,在我下载的一个示例中,我看到 $state.go 被用
谁能解释一下这种行为?我使用 history.pushState(null, null, '#test'); 推送历史状态。然后,当尝试使用console.log(window.location.ha
这里是相关代码: https://www.facebook.com/sharer/sharer.php?u={{$location.absUrl()}} https://www.facebook.c
这两个重定向之间有什么区别?我有一个应用程序,当我使用时,它可以在 chrome 和 android 4 上正常工作,但在 android 2.x.x 上不能正常工作 document.locatio
JavaScript 的区别是什么 window.location.href = window.location.href 和 window.location.reload() 功能? 最佳答案 如果
有什么区别 window.location.href="http://example.com"; window.location.replace("http://example.com"); wind
JavaScript 的区别是什么 window.location.href = window.location.href 和 window.location.reload() 功能? 最佳答案 如果
以下 3 个指令之间有区别吗? location ~* \.(png)$ { expires max; log_not_found off; } location ~ \.(png)$ {
位于正文末尾之前的以下脚本在 Internet Explorer 和 Chrome(以及任何其他浏览器)中都会被调用。但重定向到指定的 URL 仅发生在 IE 中。我还尝试了 window.locat
我正在使用 Angular ngRouter。我需要更改 url 路径以及搜索参数。我知道 $location.path 和 $location.search,但是有没有一个函数可以同时设置它们? 最
在angularjs中用$location和window.location哪个更好。 例如,我们可以使用$location.path() 或window.location.href 来完成同样的工作。
我在我的网站上使用上述 2 个命令。似乎它们对 95% 访问它应该触发的页面的人有效,但对其他人则不会。 有谁知道是否可以完全阻止这些 javascript 命令?我真的很头疼为什么它们有时不起作用。
这是我无法弄清楚的另一个错误。 我有这个类ExtendedLocation extends Location实例化时抛出 ClassCastExceptioncurrentGpsLocation =
我一直在尝试简单地将一个包含两个变量(一个字符串和一个位置)的类推送和读取到 firebase,但我一直收到此错误。 **com.google.firebase.database.DatabaseEx
我注意到 iPhone 上的“常用位置”似乎比监控 iOS 访问的应用程序 (https://developer.apple.com/reference/corelocation/clvisit) 使
在我的 javascript 代码中,在某些时候,我需要刷新窗口(用户上传了新图片但在页面中仍然可以看到它) 我想知道为什么 location.href = location.href 不刷新窗口?
我是一名优秀的程序员,十分优秀!