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

ENOENT: no such file or directory 'path/to/project.dll' to 'path/to/native/index.node' #662

Closed
himself65 opened this issue Jan 6, 2021 · 3 comments

Comments

@himself65
Copy link
Contributor

himself65 commented Jan 6, 2021

Reproduce steps:

git clone https://github.com/Himself65/neon-issue-662.git
cd neon-issue-662
yarn

Error infos

{
  "dependencies": {
    "neon-cli": "^0.7.0"
  }
}
[build-dependencies]
neon-build = "0.7.0"

[dependencies]
neon = { version = "0.7", default-features = false, features = ["napi-4"] }
> neon build
neon info running cargo
   Compiling test-neon v0.1.0 (C:\Users\himse\Code\test-neon\native)
    Finished dev [unoptimized + debuginfo] target(s) in 0.48s
neon info generating native\index.node
neon ERR! ENOENT: no such file or directory, copyfile 'C:\Users\himse\Code\test-neon\native\target\x86_64-pc-windows-msvc\debug\test_neon.dll' -> 'C:\Users\himse\Code\test-neon\native\index.node'

Error: ENOENT: no such file or directory, copyfile 'C:\Users\himse\Code\test-neon\native\target\x86_64-pc-windows-msvc\debug\test_neon.dll' -> 'C:\Users\himse\Code\test-neon\native\index.node'
@himself65
Copy link
Contributor Author

How to hot fix

PS C:\Users\himse\Code\test-neon> cd native
PS C:\Users\himse\Code\test-neon\native> cargo build
   Compiling cfg-if v1.0.0
   Compiling semver-parser v0.7.0
   Compiling smallvec v1.6.0
   Compiling cslice v0.2.0
   Compiling winapi v0.3.9
   Compiling neon v0.7.0
   Compiling test-neon v0.1.0 (C:\Users\himse\Code\test-neon\native)
   Compiling semver v0.9.0
   Compiling libloading v0.6.6
   Compiling neon-runtime v0.7.0
    Finished dev [unoptimized + debuginfo] target(s) in 4.38s
PS C:\Users\himse\Code\test-neon\native> node ../lib
hello node

@kjvalencik
Copy link
Member

@himself65 This is a duplicate of #653.

In summary, with the N-API backend, either neon-build or neon-cli should be used, but not both. We are working on an RFC to replace neon new (neon-bindings/rfcs#36), but until then it requires small changes to a project to fix it after creation.

@himself65
Copy link
Contributor Author

Thanks for help

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