Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build duck-node error on window #110

Open
ftyszyx opened this issue Aug 9, 2024 · 2 comments
Open

build duck-node error on window #110

ftyszyx opened this issue Aug 9, 2024 · 2 comments

Comments

@ftyszyx
Copy link

ftyszyx commented Aug 9, 2024

I try to build duck-node on window,but i got eror below:

`D:\opensrc\node.js\duckdb-node\src\duckdb\src\execution\window_segment_tree.cpp(1218,19): error C2065: “count”: 未声明的标识符 [D:\opensrc\node.js\duckdb-node\build\duckdb.vcxproj]
(编译源文件“../src/duckdb/ub_src_execution.cpp”)

D:\opensrc\node.js\duckdb-node\src\duckdb\src\execution\window_segment_tree.cpp(1222,16): error C2065: “count”: 未声明的标识符 [D:\opensrc\node.js\duckdb-node\build\duckdb.vcxproj]
(编译源文件“../src/duckdb/ub_src_execution.cpp”)

D:\opensrc\node.js\duckdb-node\src\duckdb\src\execution\window_segment_tree.cpp(1223,25): error C2065: “count”: 未声明的标识符 [D:\opensrc\node.js\duckdb-node\build\duckdb.vcxproj]
(编译源文件“../src/duckdb/ub_src_execution.cpp”)`

is anyone face the same problem?
cant anyone help me?

@tomnattle
Copy link

你解决了吗?我也遇到了,前几天编译还正常的,今天突然无法编译了。

@tomnattle
Copy link

问题找到了,原因是,
node_modules@mapbox\node-pre-gyp 这目录下的文件不完整,下图是完整的,文件
企业微信截图_17340567466092

通过 registry.npmmirror.com下载的包是完整的

"@mapbox/node-pre-gyp@^1.0.0":
  version "1.0.11"
  resolved "https://registry.npmmirror.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa"
  integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==
  dependencies:
    detect-libc "^2.0.0"
    https-proxy-agent "^5.0.0"
    make-dir "^3.1.0"
    node-fetch "^2.6.7"
    nopt "^5.0.0"
    npmlog "^5.0.1"
    rimraf "^3.0.2"
    semver "^7.3.5"
    tar "^6.1.11"

如果不是这个仓库地址下载的包,缺失文件,

"@mapbox/node-pre-gyp@^1.0.0":
  version "1.0.11"
  resolved "https://mirrors.cloud.tencent.com/npm/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa"
  integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==
  dependencies:
    detect-libc "^2.0.0"
    https-proxy-agent "^5.0.0"
    make-dir "^3.1.0"
    node-fetch "^2.6.7"
    nopt "^5.0.0"
    npmlog "^5.0.1"
    rimraf "^3.0.2"
    semver "^7.3.5"
    tar "^6.1.11"

企业微信截图_17340565479587

为什么会这样尼?

因为这两个项目,其中一个走了 npm 源下载,另一个直接是官网下载。 我这边有个同事给项目引入了 canvas包,这个包依赖 @mapbox/node-pre-gyp@^1.0.0 , 他从源仓库下载了改文件导致的。删除这个包,项目中的 node-pre-gyp 又恢复到 从官网下载,这里 有点迷。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants