版本- cmake-3.5.1 cmake-js-4.0.1 npm-6.4.1 节点-8.14
我正在尝试在节点应用程序的package.js中使用cmake-js
{
"name": "test_cpp_with_node",
"version": "1.0.10",
"description": "",
"main": "index.js",
"scripts": {
"install": "cmake-js compile --log-level silly"
},
"author": "",
"license": "ISC"
}
当我执行“安装”命令时,它可以在我的代码中本地运行-我看到生成的创建文件夹并且.so在那里-成功。 现在-我打包了(npm pack)-当然,我之前删除了build文件夹,并将其上传到我拥有的本地本地npm(在gemfury上)
在一个想通过npm install使用它的客户端项目上,在安装过程中出现以下错误: “错误:ENOENT:没有这样的文件或目录,uv_chdir”
info TOOL Using Unix Makefiles generator.
info CMD CONFIGURE
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "/home/user1/git/folder/src/test1/node_modules/test_cpp_with_node/build"
info CMD CONFIGURE
ERR! OMG Error: ENOENT: no such file or directory, uv_chdir
ERR! OMG at process.chdir (/usr/lib/node_modules/cmake-js/node_modules/graceful-fs/polyfills.js:20:9)
ERR! OMG at CMake.<anonymous> (/usr/lib/node_modules/cmake-js/lib/es6/cMake.js:238:13)
ERR! OMG at Generator.throw (<anonymous>)
ERR! OMG at Generator.tryCatcher (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/util.js:16:23)
ERR! OMG at PromiseSpawn._promiseRejected (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/generators.js:107:10)
ERR! OMG at Promise._settlePromise (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/promise.js:576:26)
ERR! OMG at Promise._settlePromise0 (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/promise.js:614:10)
ERR! OMG at Promise._settlePromises (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/promise.js:690:18)
ERR! OMG at _drainQueueStep (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/async.js:138:12)
ERR! OMG at _drainQueue (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/async.js:131:9)
ERR! OMG at Async._drainQueues (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/async.js:147:5)
ERR! OMG at Immediate.Async.drainQueues (/usr/lib/node_modules/cmake-js/node_modules/bluebird/js/release/async.js:17:14)
ERR! OMG at runCallback (timers.js:810:20)
ERR! OMG at tryOnImmediate (timers.js:768:5)
ERR! OMG at processImmediate [as _immediateCallback] (timers.js:745:5)