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

part two get Could not verify: Error: EISDIR #99

Open
thyecust opened this issue Aug 24, 2021 · 2 comments
Open

part two get Could not verify: Error: EISDIR #99

thyecust opened this issue Aug 24, 2021 · 2 comments

Comments

@thyecust
Copy link

thyecust commented Aug 24, 2021

I get this error in part two but didn't find any difference between my code and solution

> goingnative verify myaddon
Could not verify: Error: EISDIR: illegal operation on a directory, open 'C:\Users\thy\Documents\node-native\~test-addon-faux.3166'

My code:

> ls .\myaddon\


    目录: C:\Users\thy\Documents\node-native\myaddon


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2021/8/24     19:54                node_modules
-a----         2021/8/24     20:08            217 binding.gyp
-a----         2021/8/24     20:32             86 index.js
-a----         2021/8/24     20:43              0 myaddon.cc
-a----         2021/8/24     20:00            269 package.json

index.js

const bindings = require('bindings')
var addon = bindings('myaddon')

addon.print()
@thyecust thyecust changed the title Challenge 3 get Could not verify: Error: EISDIR part two get Could not verify: Error: EISDIR Aug 24, 2021
@thyecust
Copy link
Author

thyecust commented Aug 24, 2021

I can fix it by adding a path.join

function copyFauxAddon (mode, callback) {
  copy(path.join(__dirname, 'faux', 'myaddon.cc'), path.join(copyFauxTempDir, "myaddon.cc"), { overwrite: true }, function (err) {
    if (err) { return callback(err) }

    callback(null, true)
  })
}

It can be compiled but still can't be required by exercise.js. Do you have a plan to support windows and cmd?

@thyecust
Copy link
Author

I have made some modification, you can see it in #100.

Now the verify result is

PS C:\Users\thy\Documents\goingnative\goingnative> node .\bin\goingnative verify myaddon1
 ✓ 

 package.json contains "gypfile": true

 ✓ 

 binding.gyp includes a "myaddon" target

 ✓ 
 binding.gyp includes "myaddon.cc" as a source file

 ✓ 

 binding.gyp includes a correct NAN include statement

在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。
  myaddon.cc
  win_delay_load_hook.cc
    正在创建库 C:\Users\thy\Documents\goingnative\goingnative\~test-addon-faux.3782\build\Release\myaddon.lib 和对象 C:\Users\thy\Documents\goingnative\goingnative\
  ~test-addon-faux.3782\build\Release\myaddon.exp
  正在生成代码
  Previous IPDB not found, fall back to full compilation.
  All 69 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
  已完成代码的生成
  myaddon.vcxproj -> C:\Users\thy\Documents\goingnative\goingnative\~test-addon-faux.3782\build\Release\\myaddon.node
C:\Users\thy\Documents\goingnative\goingnative\~test-addon-faux.3782\build\Release\myaddon
 ✗ 

 JavaScript code loads addon and invokes print() method
To https:

I'm looking forward to your detailed 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

1 participant