简体   繁体   English

Node-oracledb 无法运行,并显示“找不到模块 '../build/Debug/oracledb'”

[英]Node-oracledb fails to run with "Cannot find module '../build/Debug/oracledb'"

I'm trying to install the Node oracledb package on Windows 8.1 x64, which is known to be complicated.我正在尝试在 Windows 8.1 x64 上安装 Node oracledb 包,众所周知,这很复杂。 I followed the instructions in this detailed article .我按照这篇详细文章中的说明进行操作。 I still got the error MSB4019 when trying to install, but I solved with one of the answers in an SO question.尝试安装时我仍然收到错误 MSB4019,但我用 SO 问题中的一个答案解决了。 But then when running my tests with Karma (jasmine tests), I get this:但是当使用 Karma(茉莉花测试)运行我的测试时,我得到了这个:

C:\\Users\\potero\\angular\\Sunnel_View_Test\\unit\\jasmine>call karma start C:\\Users\\ potero\\angular\\Sunnel_View_Test\\unit\\jasmine\\conf\\karma.conf.js 04 02 2016 11:42:39.758:INFO [framework.browserify]: registering rebuild (autoWa tch=true) 04 02 2016 11:42:40.581:ERROR [framework.browserify]: bundle error 04 02 2016 11:42:40.581:ERROR [framework.browserify]: Error: Cannot find module '../build/Release/oracledb' from 'C:\\Users\\potero\\node_modules\\oracledb\\lib' 04 02 2016 11:42:40.583:WARN [karma]: No captured browser, open http://localhost :9876/ 04 02 2016 11:42:40.590:INFO [karma]: Karma v0.13.19 server started at http://lo calhost:9876/ 04 02 2016 11:42:40.599:INFO [launcher]: Starting browser IE 04 02 2016 11:42:40.608:INFO [launcher]: Starting browser Chrome 04 02 2016 11:42:40.613:ERROR [framework.browserify]: bundle error 04 02 2016 11:42:40.613:ERROR [framework.browserify]: Error: Cannot find module '../build/Debug/oracledb' from 'C:\\Users\\potero\\node_modules\\oracledb\\lib' 04 02 201 C:\\Users\\potero\\angular\\Sunnel_View_Test\\unit\\jasmine>call karma start C:\\Users\\potero\\angular\\Sunnel_View_Test\\unit\\jasmine\\conf\\karma.conf.js 04 02 2016 11:42:39.758:INFO [framework.browserify]: 注册重建 (autoWa tch=true) 04 02 2016 11:42:40.581:ERROR [framework.browserify]: bundle error 04 02 2016 11:42:40.581:ERROR [framework.browserify]: Error找不到模块 '../build/Release/oracledb' from 'C:\\Users\\potero\\node_modules\\oracledb\\lib' 04 02 2016 11:42:40.583:WARN [karma]: 没有捕获的浏览器,打开http:/ /localhost :9876/ 04 02 2016 11:42:40.590:INFO [karma]:Karma v0.13.19 服务器启动于http://lo calhost:9876/ 04 02 2016 11:42:40.599:INFO [launcher]:启动浏览器 IE 04 02 2016 11:42:40.608:INFO [launcher]: 启动浏览器 Chrome 04 02 2016 11:42:40.613:ERROR [framework.browserify]: 捆绑错误 04 02 2016 11:413:ERRORwork.framework [framework.browserify] browserify]:错误:无法从“C:\\Users\\potero\\node_modules\\oracledb\\lib”中找到模块“../build/Debug/oracledb” 04 02 201 6 11:42:40.615:INFO [framework.browserify]: bundle updated 04 02 2016 11:42:41.318:INFO [IE 11.0.0 (Windows 8.1 0.0.0)]: Connected on socke t /#jugOlM6ncxlElbTbAAAA with id 28583632 04 02 2016 11:42:43.555:INFO [Chrome 48.0.2564 (Windows 8.1 0.0.0)]: Connected on socket /#bwze1YzRw7uyxQfwAAAB with id 57743574 6 11:42:40.615:INFO [framework.browserify]: 包更新 04 02 2016 11:42:41.318:INFO [IE 11.0.0 (Windows 8.1 0.0.0)]: 连接在 socke t /#aaax5ElM6ElM36 04 02 2016 11:42:43.555:INFO [Chrome 48.0.2564 (Windows 8.1 0.0.0)]:连接到套接字 /#bwze1YzRw7uyxQfwAAAB,ID 为 57743574

START: IE 11.0.0 (Windows 8.1 0.0.0) ERROR bundle error (see logs)开始:IE 11.0.0 (Windows 8.1 0.0.0) ERROR 包错误(见日志)
at C:/Users/potero/AppData/Local/Temp/fcd332ac97c6f0099b6d2cbea5282df8.browser ify:1 Chrome 48.0.2564 (Windows 8.1 0.0.0) ERROR Uncaught Error: bundle error (see logs) at C:/Users/potero/AppData/Local/Temp/fcd332ac97c6f0099b6d2cbea5282df8.browser ify:1在 C:/Users/potero/AppData/Local/Temp/fcd332ac97c6f0099b6d2cbea5282df8.browser ify:1 Chrome 48.0.2564 (Windows 8.1 0.0.0) ERROR Uncaught Error: bundle error (see logs) at C:/Datas/pot /Local/Temp/fcd332ac97c6f0099b6d2cbea5282df8.browser ify:1

Finished in 3.922 secs / 0 secs在 3.922 秒/0 秒内完成

SUMMARY: V 0 tests completed总结:V 0 测试完成

There is a similar issue on the package Github page but the solution given there (re installing node) did not work for me.包 Github 页面上有一个类似的问题,但那里给出的解决方案(重新安装节点)对我不起作用。 I also re installed oracledb without success.我也重新安装了 oracledb 没有成功。

I checked the folders referred in the error message and the files are not there as stated.我检查了错误消息中提到的文件夹,但文件并不如所述。

Why does it need those files?为什么需要这些文件? Why weren't them installed?为什么没有安装它们? Why does it look up for them on my home folder instead that on the folder the project is?为什么它会在我的主文件夹中而不是在项目所在的文件夹中查找它们?

PATH 中是否包含 Oracle 客户端库(例如 Instant Client)?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM