-
Notifications
You must be signed in to change notification settings - Fork 595
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
C1083: Cannot open include file: 'napi.h': No such file or directory #183
Comments
So I found that if we simply change line 3 of const include_dir = `"${path.relative('.', __dirname)}"`; then it works on both platforms. Can we have this change made? |
@SurienDG can you submit a PR for that change? |
@mhdawson Sure thing 😀. I added one here: nodejs/node-addon-api#1001 |
@SurienDG thanks. For some reason the PR seems to cause failures across platforms, can you take a look. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get an error about not being able to find
napi.h
on Windows.This only occurs when I use
"include_dirs": ["<!@(node -p \"require('node-addon-api').include_dir\")"]
versus"include_dirs": ["<!@(node -p \"require('node-addon-api').include\")"]
(I was trying to use the former because in theindex.js
file it says the latter is deprecated.The only difference I noticed is that inside the in the
index.js
file in the repo we have theinclude
path in escaped quotes.I've tried doing this as an experiment in another bindings repo and I found if I add the quotes to the include path it works versus without.
include: `"${__dirname}"`
versus
include: `${__dirname}`
(The second one gives the error)
[Edit]: I just tried this on Linux (using WSL) and seems like I have the inverse problem...
The text was updated successfully, but these errors were encountered: