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

npm install fs-ext -g FAILS #57

Closed
dzilbers opened this issue Apr 1, 2016 · 54 comments
Closed

npm install fs-ext -g FAILS #57

dzilbers opened this issue Apr 1, 2016 · 54 comments

Comments

@dzilbers
Copy link

dzilbers commented Apr 1, 2016

Fails installing fs-ext with compilation errors:

C:\Dani-R&D\JS\mqttd>npm install fs-ext -g

[email protected] install C:\Dani-R&D\nodejs\node_modules\fs-ext
node-gyp configure build

C:\Dani-R&D\nodejs\node_modules\fs-ext>if not defined npm_config_node_gyp (node "C:\Dani-R&D\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node "" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
fs-ext.cc
..\fs-ext.cc(108): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Dani-R&D\nodejs\node_modules\fs-ext\build\fs-ext.vcxproj]
C:\Dani-R&D\nodejs\node_modules\fs-ext\node_modules\nan\nan.h(866): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(195): error C3861: 'fcntl': identifier not found [C:\Dani-R&D\nodejs\node_modules\fs-ext\build\fs-ext.vcxproj]
..\fs-ext.cc(297): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Dani-R&D\nodejs\node_modules\fs-ext\build\fs-ext.vcxproj]
C:\Dani-R&D\nodejs\node_modules\fs-ext\node_modules\nan\nan.h(866): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(339): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Dani-R&D\nodejs\node_modules\fs-ext\build\fs-ext.vcxproj]
C:\Dani-R&D\nodejs\node_modules\fs-ext\node_modules\nan\nan.h(866): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(374): error C3861: 'fcntl': identifier not found [C:\Dani-R&D\nodejs\node_modules\fs-ext\build\fs-ext.vcxproj]
..\fs-ext.cc(375): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Dani-R&D\nodejs\node_modules\fs-ext\build\fs-ext.vcxproj]
C:\Dani-R&D\nodejs\node_modules\fs-ext\node_modules\nan\nan.h(866): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(433): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Dani-R&D\nodejs\node_modules\fs-ext\build\fs-ext.vcxproj]
C:\Dani-R&D\nodejs\node_modules\fs-ext\node_modules\nan\nan.h(866): note: see declaration of 'Nan::NanErrnoException'
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Dani-R&D\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Dani-R&D\nodejs\node.exe" "C:\Dani-R&D\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Dani-R&D\nodejs\node_modules\fs-ext
gyp ERR! node -v v5.10.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Dani-R&D\nodejs\node.exe" "C:\Dani-R&D\nodejs\node_modules\npm\bin\npm-cli.js" "install" "fs-ext" "-g"
npm ERR! node v5.10.0
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp configure build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the fs-ext package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs fs-ext
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls fs-ext
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Dani-R&D\JS\mqttd\npm-debug.log
npm-debug.log.txt

windows 10 pro 64-bit, VS2015 Community installed, node -v 5.10.0

@davedoesdev
Copy link
Contributor

It's not difficult to fix the compile errors but none of the functions in this module which use file descriptors work because of nodejs/node-gyp#416 (_get_osfhandle returns -1 and sets errno to EBADF).
So I think it's best just to say Windows is not supported.

@dzilbers
Copy link
Author

No it's far from being best. Windows is supported - it is a part of
supported working environments.

BR
Dani Zilberstein
home: +972-(0)9-7495890
mob: +972-(0)50-8503456
e-mail: [email protected] [email protected]

On Wed, Apr 20, 2016 at 11:49 AM, David Halls [email protected]
wrote:

It's not difficult to fix the compile errors but none of the functions in
this module which use file descriptors work because of nodejs/node-gyp#416
nodejs/node-gyp#416 (_get_osfhandle returns
-1 and sets errno to EBADF).
So I think it's best just to say Windows is not supported.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#57 (comment)

@davedoesdev
Copy link
Contributor

Per davedoesdev/qlobber-fsq#4 (comment) I won't be needing Windows support from fs-ext. So @baudehlo over to you :-)

@baudehlo
Copy link
Owner

Damn :)

On Fri, Apr 22, 2016 at 5:49 PM, David Halls [email protected]
wrote:

Per davedoesdev/qlobber-fsq#4 (comment)
davedoesdev/qlobber-fsq#4 (comment)
I won't be needing Windows support from fs-ext. So @baudehlo
https://github.com/baudehlo over to you :-)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#57 (comment)

@davedoesdev
Copy link
Contributor

davedoesdev commented Apr 22, 2016

I can't see how flock (LockFileEx) is supportable on Windows given that Node is statically linked to MSVCR.

What I would request is if you decide not to support Windows then declare that in package.json (https://docs.npmjs.com/files/package.json#os).

This situation is really a shame since Node itself doesn't support OS-level file locking and the static linking to C runtime prevents add-ons from doing it. There are alternatives like lockfile and node-proper-lockfile but they have their own issues (cleanup, timeouts).

@davedoesdev
Copy link
Contributor

davedoesdev commented Apr 22, 2016

... or if you decide to remove flock just on Windows, it would be nice if it didn't appear in the exports so once could do a feature-based test as to whether it's available (rather than calling it and finding out the hard way).

@davedoesdev
Copy link
Contributor

Btw- thanks for making this module, flock is really useful to have on Linux.

@baudehlo
Copy link
Owner

It's not just useful - it's absolutely required. I shake my head that it's not in core :(

On Apr 22, 2016, at 6:05 PM, David Halls [email protected] wrote:

Btw- thanks for making this module, flock is really useful to have on Linux.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@davedoesdev
Copy link
Contributor

@baudehlo how would you like to proceed? Since I have a Windows machine now, I can make changes and submit a PR.

@baudehlo
Copy link
Owner

I would love that. I don't know how to develop things on Windows.

On Apr 23, 2016, at 1:51 AM, David Halls [email protected] wrote:

@baudehlo how would you like to proceed? Since I have a Windows machine now, I can make changes and submit a PR.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@davedoesdev
Copy link
Contributor

davedoesdev commented Apr 23, 2016

Which approach would you like to take? Drop Windows support completely or just remove flock?
FYI, none of the tests pass on Windows:

$ node tests/test-fs-fcntl
FAILURE: F_SETFD is not defined correctly
  F_SETFD    undefined    "undefined"
FAILURE: F_GETFD is not defined correctly
  F_GETFD    undefined    "undefined"
FAILURE: FD_CLOEXEC is not defined correctly
  FD_CLOEXEC    undefined    "undefined"
FAILURE: expect_errno: fcntlSync(): expected error EBADF, got another error
   ARGS:  { '0': 'fcntlSync',
  '1': -9,
  '2': [TypeError: binding.fcntl is not a function],
  '3': 'EBADF' }
FAILURE: expect_errno: fcntlSync(): expected error EBADF, got another error
   ARGS:  { '0': 'fcntlSync',
  '1': 98765,
  '2': [TypeError: binding.fcntl is not a function],
  '3': 'EBADF' }
FAILURE: expect_ok: fcntlSync(): returned error
   ARGS:  { '0': 'fcntlSync',
  '1': 3,
  '2': [TypeError: binding.fcntl is not a function] }
FAILURE: expect_ok: fcntlSync(): returned error
   ARGS:  { '0': 'fcntlSync',
  '1': 3,
  '2': [TypeError: binding.fcntl is not a function] }
Tests run: 14     ok: 6
C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:95
  return binding.fcntl(fd, cmd, arg, callback);
                 ^

TypeError: binding.fcntl is not a function
    at Object.exports.fcntl (C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:95:1
8)
    at Object.<anonymous> (C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-fc
ntl.js:275:4)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:146:18)
    at node.js:404:3

Lucie@Lucie-PC MINGW32 ~/Documents/node-fs-ext (master)
$ node tests/test-fs-seek
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descrip
tor'  (expecting EINVAL)
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descrip
tor'  (expecting EINVAL)
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descrip
tor'  (expecting EINVAL)
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 98765 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 2147483647 }
FAILURE: expect_value: seekSync(): returned error Not an integer
   ARGS:  { '0': 'seekSync',
  '1': [TypeError: Not an integer],
  '2': undefined,
  '3': 2147483648 }
FAILURE: expect_value: seekSync(): returned error Not an integer
   ARGS:  { '0': 'seekSync',
  '1': [TypeError: Not an integer],
  '2': undefined,
  '3': 45097156608 }
FAILURE: expect_value: seekSync(): returned error Not an integer
   ARGS:  { '0': 'seekSync',
  '1': [TypeError: Not an integer],
  '2': undefined,
  '3': 8796093022207 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seek',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seek',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seek',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_errno: seek(): returned wrong errno 'EBADF, Bad file descriptor'
  (expecting EINVAL)
Tests run: 30     ok: 11
C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:110
  binding.seek(fd, position, whence, callback);
          ^

TypeError: Not an integer
    at TypeError (native)
    at Object.exports.seek (C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:110:1
1)
    at C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-seek.js:543:12

Lucie@Lucie-PC MINGW32 ~/Documents/node-fs-ext (master)
$ node tests/test-fs-flock
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
   ARGS:  { '0': 'flock',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
   ARGS:  { '0': 'flock',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
   ARGS:  { '0': 'flock',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
Tests run: 26     ok: 14

assert.js:90
  throw new assert.AssertionError({
  ^
 AssertionError: One or more subtests failed
    at process.<anonymous> (C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-f
lock.js:58:10)
    at emitOne (events.js:90:13)
    at process.emit (events.js:182:7)

Lucie@Lucie-PC MINGW32 ~/Documents/node-fs-ext (master)
$ node tests/test-fs-utime
FAILURE: expect_ok: utimeSync(): returned error EINVAL, Invalid argument '\tmp\w
hat.when.utime.test'
Tests run: 11     ok: 10
One or more subtests failed!

@davedoesdev
Copy link
Contributor

Btw- that was using VS2015 Community Edition on Windows 10.
The MINGW32 in the output is just the shell.

@davedoesdev
Copy link
Contributor

Same output when run from command prompt:

C:\Users\Lucie\Documents\node-fs-ext>node tests/test-fs-fcntl
FAILURE: F_SETFD is not defined correctly
  F_SETFD    undefined    "undefined"
FAILURE: F_GETFD is not defined correctly
  F_GETFD    undefined    "undefined"
FAILURE: FD_CLOEXEC is not defined correctly
  FD_CLOEXEC    undefined    "undefined"
FAILURE: expect_errno: fcntlSync(): expected error EBADF, got another error
   ARGS:  { '0': 'fcntlSync',
  '1': -9,
  '2': [TypeError: binding.fcntl is not a function],
  '3': 'EBADF' }
FAILURE: expect_errno: fcntlSync(): expected error EBADF, got another error
   ARGS:  { '0': 'fcntlSync',
  '1': 98765,
  '2': [TypeError: binding.fcntl is not a function],
  '3': 'EBADF' }
FAILURE: expect_ok: fcntlSync(): returned error
   ARGS:  { '0': 'fcntlSync',
  '1': 3,
  '2': [TypeError: binding.fcntl is not a function] }
FAILURE: expect_ok: fcntlSync(): returned error
   ARGS:  { '0': 'fcntlSync',
  '1': 3,
  '2': [TypeError: binding.fcntl is not a function] }
Tests run: 14     ok: 6
C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:95
  return binding.fcntl(fd, cmd, arg, callback);
                 ^

TypeError: binding.fcntl is not a function
    at Object.exports.fcntl (C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:95:18)
    at Object.<anonymous> (C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-fcntl.js:275:4)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:146:18)
    at node.js:404:3

C:\Users\Lucie\Documents\node-fs-ext>node tests/test-fs-seek
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descriptor'  (expecting EINVAL)
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descriptor'  (expecting EINVAL)
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descriptor'  (expecting EINVAL)
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 98765 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 2147483647 }
FAILURE: expect_value: seekSync(): returned error Not an integer
   ARGS:  { '0': 'seekSync',
  '1': [TypeError: Not an integer],
  '2': undefined,
  '3': 2147483648 }
FAILURE: expect_value: seekSync(): returned error Not an integer
   ARGS:  { '0': 'seekSync',
  '1': [TypeError: Not an integer],
  '2': undefined,
  '3': 45097156608 }
FAILURE: expect_value: seekSync(): returned error Not an integer
   ARGS:  { '0': 'seekSync',
  '1': [TypeError: Not an integer],
  '2': undefined,
  '3': 8796093022207 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seekSync',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seek',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seek',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
   ARGS:  { '0': 'seek',
  '1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
  '2': undefined,
  '3': 0 }
FAILURE: expect_errno: seek(): returned wrong errno 'EBADF, Bad file descriptor'  (expecting EINVAL)
Tests run: 30     ok: 11
C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:110
  binding.seek(fd, position, whence, callback);
          ^

TypeError: Not an integer
    at TypeError (native)
    at Object.exports.seek (C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:110:11)
    at C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-seek.js:543:12

C:\Users\Lucie\Documents\node-fs-ext>node tests/test-fs-flock
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
   ARGS:  { '0': 'flockSync',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
   ARGS:  { '0': 'flock',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
   ARGS:  { '0': 'flock',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
   ARGS:  { '0': 'flock',
  '1': 3,
  '2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
Tests run: 26     ok: 14

assert.js:90
  throw new assert.AssertionError({
  ^
 AssertionError: One or more subtests failed
    at process.<anonymous> (C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-flock.js:58:10)
    at emitOne (events.js:90:13)
    at process.emit (events.js:182:7)

C:\Users\Lucie\Documents\node-fs-ext>node tests/test-fs-utime
FAILURE: expect_ok: utimeSync(): returned error EINVAL, Invalid argument '\tmp\what.when.utime.test'
Tests run: 11     ok: 10
One or more subtests failed!

@baudehlo
Copy link
Owner

I'd much prefer there to be a stance where it can actually work on Windows. Want me to bring in someone better experienced in that environment like @indutny or @bnoordhuis or someone else on the node core team who knows windows well?

On Apr 23, 2016, at 2:07 AM, David Halls [email protected] wrote:

Same output when run from command prompt:

C:\Users\Lucie\Documents\node-fs-ext>node tests/test-fs-fcntl
FAILURE: F_SETFD is not defined correctly
F_SETFD undefined "undefined"
FAILURE: F_GETFD is not defined correctly
F_GETFD undefined "undefined"
FAILURE: FD_CLOEXEC is not defined correctly
FD_CLOEXEC undefined "undefined"
FAILURE: expect_errno: fcntlSync(): expected error EBADF, got another error
ARGS: { '0': 'fcntlSync',
'1': -9,
'2': [TypeError: binding.fcntl is not a function],
'3': 'EBADF' }
FAILURE: expect_errno: fcntlSync(): expected error EBADF, got another error
ARGS: { '0': 'fcntlSync',
'1': 98765,
'2': [TypeError: binding.fcntl is not a function],
'3': 'EBADF' }
FAILURE: expect_ok: fcntlSync(): returned error
ARGS: { '0': 'fcntlSync',
'1': 3,
'2': [TypeError: binding.fcntl is not a function] }
FAILURE: expect_ok: fcntlSync(): returned error
ARGS: { '0': 'fcntlSync',
'1': 3,
'2': [TypeError: binding.fcntl is not a function] }
Tests run: 14 ok: 6
C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:95
return binding.fcntl(fd, cmd, arg, callback);
^

TypeError: binding.fcntl is not a function
at Object.exports.fcntl (C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:95:18)
at Object. (C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-fcntl.js:275:4)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:146:18)
at node.js:404:3

C:\Users\Lucie\Documents\node-fs-ext>node tests/test-fs-seek
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descriptor' (expecting EINVAL)
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descriptor' (expecting EINVAL)
FAILURE: expect_errno: seekSync(): returned wrong errno 'EBADF, Bad file descriptor' (expecting EINVAL)
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seekSync',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 98765 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seekSync',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 2147483647 }
FAILURE: expect_value: seekSync(): returned error Not an integer
ARGS: { '0': 'seekSync',
'1': [TypeError: Not an integer],
'2': undefined,
'3': 2147483648 }
FAILURE: expect_value: seekSync(): returned error Not an integer
ARGS: { '0': 'seekSync',
'1': [TypeError: Not an integer],
'2': undefined,
'3': 45097156608 }
FAILURE: expect_value: seekSync(): returned error Not an integer
ARGS: { '0': 'seekSync',
'1': [TypeError: Not an integer],
'2': undefined,
'3': 8796093022207 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seekSync',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seekSync',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seekSync',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seekSync',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seekSync',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_value: seekSync(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seekSync',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seek',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seek',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_value: seek(): returned error EBADF, Bad file descriptor
ARGS: { '0': 'seek',
'1': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' },
'2': undefined,
'3': 0 }
FAILURE: expect_errno: seek(): returned wrong errno 'EBADF, Bad file descriptor' (expecting EINVAL)
Tests run: 30 ok: 11
C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:110
binding.seek(fd, position, whence, callback);
^

TypeError: Not an integer
at TypeError (native)
at Object.exports.seek (C:\Users\Lucie\Documents\node-fs-ext\fs-ext.js:110:11)
at C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-seek.js:543:12

C:\Users\Lucie\Documents\node-fs-ext>node tests/test-fs-flock
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flockSync(): returned error
ARGS: { '0': 'flockSync',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
ARGS: { '0': 'flock',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
ARGS: { '0': 'flock',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
FAILURE: expect_ok: flock(): returned error
ARGS: { '0': 'flock',
'1': 3,
'2': { [Error: EBADF, Bad file descriptor] errno: 9, code: 'EBADF' } }
Tests run: 26 ok: 14

assert.js:90
throw new assert.AssertionError({
^
AssertionError: One or more subtests failed
at process. (C:\Users\Lucie\Documents\node-fs-ext\tests\test-fs-flock.js:58:10)
at emitOne (events.js:90:13)
at process.emit (events.js:182:7)

C:\Users\Lucie\Documents\node-fs-ext>node tests/test-fs-utime
FAILURE: expect_ok: utimeSync(): returned error EINVAL, Invalid argument '\tmp\what.when.utime.test'
Tests run: 11 ok: 10
One or more subtests failed!

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@davedoesdev
Copy link
Contributor

The more the merrier! Basically, nodejs/node-gyp#416 needs to be solved.

An alternative is to change flock's API and pass in a path, letting fs-ext do the opening.

I've done a fair bit of Windows, but in $DAYJOB and don't like to mix the two :-)

@davedoesdev
Copy link
Contributor

davedoesdev commented Apr 23, 2016

... or Node itself could export _get_osfhandle

It could export a function (from Node.exe) which calls https://github.com/nodejs/node/blob/be68b68d4863f0d389cc46fdf6f1cbcd1b241d0a/deps/uv/src/win/handle-inl.h#L165

@bnoordhuis
Copy link

Can I suggest filing a nodejs/node issue? The CRT is currently linked statically into the node binary. I suspect it needs to be re-exported so add-ons can link against it. For this particular case, it might be as easy as adding a 'ExportNamedFunctions': ['_get_osfhandle'] to common.gypi.

@bvankeir
Copy link

Hi, there has been some time since the last comment and I'm not sure I'm at the right place with this question... I was wondering but would there be a work-around available? I'm trying to get mosca mqtt broker to work on windows 10 64 bit. This module depends on fs-ext which won't build: I get the same errors at exactly the same lines in code as in first post of this issue. I also see in @davedoesdev's reference there is no progress since May. Do any of you guys see a way out of this? Currently 'Windows is not supported' seems to be the final verdict or am I mistaking here?

@davedoesdev
Copy link
Contributor

This issue is blocked by nodejs/node#6369
However, in davedoesdev/qlobber-fsq#4 I made use of fs-ext optional.
I believe mosca was modified to use the updated qlobber-fsq version, let me check.

@davedoesdev
Copy link
Contributor

Should have been addressed in moscajs/ascoltatori#147
I'll try it out in a Windows VM.

@davedoesdev
Copy link
Contributor

mosca installs fine for me on Windows 10 + Visual Studio Community 2015.
@bvankeir could you open an issue on mosca if there isn't one already please?

@davedoesdev
Copy link
Contributor

Btw, since fs-ext is an optional dependency now, you'll see the same errors as npm will try to compile it. However, the errors will be ignored. You can check this because the node_modules/mosca directory should be created and require('mosca') should work.

@baudehlo
Copy link
Owner

libuv/libuv#1323

@ripper234
Copy link

Still happens on latest Win10

npm install fs-ext

> [email protected] install C:\tmp\asdf\node_modules\fs-ext
> node-gyp configure build


C:\tmp\asdf\node_modules\fs-ext>if not defined npm_config_node_gyp (node "C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build )  else (node "" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
..\fs-ext.cc(195): error C3861: 'fcntl': identifier not found [C:\tmp\asdf\node_modules\fs-ext\build\fs-ext.vcxproj]
..\fs-ext.cc(374): error C3861: 'fcntl': identifier not found [C:\tmp\asdf\node_modules\fs-ext\build\fs-ext.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\User\AppData\Roaming\nvm\v7.5.0\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:192:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\User\\AppData\\Roaming\\nvm\\v7.5.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\tmp\asdf\node_modules\fs-ext
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\tmp\asdf\package.json'
npm WARN asdf No description
npm WARN asdf No repository field.
npm WARN asdf No README data
npm WARN asdf No license field.
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "fs-ext"
npm ERR! node v7.5.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp configure build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the fs-ext package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs fs-ext
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls fs-ext
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\User\AppData\Roaming\npm-cache\_logs\2017-05-26T14_31_08_857Z-debug.log

@baudehlo
Copy link
Owner

baudehlo commented May 26, 2017 via email

@ripper234
Copy link

You mean nodejs/node-gyp#416 ?

@yaananth
Copy link

yaananth commented Jul 25, 2017

I actually still get an error for windows:

npm install fs-ext
if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build )  else (node "" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
..\fs-ext.cc(192): error C3861: 'uv_get_osfhandle': identifier not found [E:\test\node_modules\fs-ext\b
uild\fs-ext.vcxproj]
..\fs-ext.cc(287): error C3861: 'uv_get_osfhandle': identifier not found [E:\test\node_modules\fs-ext\b
uild\fs-ext.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"

@baudehlo
Copy link
Owner

baudehlo commented Jul 25, 2017 via email

@yaananth
Copy link

yaananth commented Jul 25, 2017

Thanks!
I did npm install [email protected]
Now it fails with same errors as others:

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
..\fs-ext.cc(195): error C3861: 'fcntl': identifier not found [E:\test\node_modules\fs-ext\build\fs-ext
.vcxproj]
..\fs-ext.cc(374): error C3861: 'fcntl': identifier not found [E:\test\node_modules\fs-ext\build\fs-ext
.vcxproj]

@davedoesdev
Copy link
Contributor

@yaananth I've not installed Node that way before - interesting if it works!
What does node --version say in your shell?

@davedoesdev
Copy link
Contributor

davedoesdev commented Jul 25, 2017

Also, those line numbers don't match up. On master, line 195 is

    return -1;

and line 374 is blank.

@yaananth
Copy link

hm you are right, it's still getting old version that's installed on my box. I will update node installation instead and will let you know.

@davedoesdev
Copy link
Contributor

Actually I don't think a new version has been published yet.

@yaananth
Copy link

yaananth commented Jul 25, 2017

No luck.
Installed node from https://nodejs.org/en/download/current/

if not defined npm_config_node_gyp (node "C:\Users\testUser\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build )  else (node "" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
..\fs-ext.cc(195): error C3861: 'fcntl': identifier not found [E:\test\node_modules\fs-ext\build\fs-ext
.vcxproj]
..\fs-ext.cc(374): error C3861: 'fcntl': identifier not found [E:\test\node_modules\fs-ext\build\fs-ext
.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\testUser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\testUser\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd E:\test\node_modules\fs-ext
gyp ERR! node -v v8.2.1
gyp ERR! node-gyp -v v3.6.2

@davedoesdev
Copy link
Contributor

@yaananth This is fixed in master but not published on npm yet (I think - @baudehlo can confirm)

@baudehlo
Copy link
Owner

baudehlo commented Jul 25, 2017 via email

@yaananth
Copy link

Which package are we talking about?
https://github.com/nodejs/node-gyp ?

@baudehlo
Copy link
Owner

baudehlo commented Jul 25, 2017 via email

@rcjsuen
Copy link

rcjsuen commented Sep 19, 2017

When should we expect a new version to be published on npm?

@baudehlo
Copy link
Owner

Just this second.

@Mic75
Copy link

Mic75 commented Jan 8, 2018

I might be a little off topic here, but I am still getting the issue on Windows 10, when using electron-rebuild. I am using electron 1.7.10 (latest at that time) which comes with Node 8.2.1. From what I understood, building fs-ext should work with that version of Node.
What am I missing here ?

Error: Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
..\fs-ext.cc(187): error C3861: 'uv_get_osfhandle': identifier not found [C:\Users\mathieub\Devs\uw-hub-floating\node_modules\fs-ext\build\fs-ext.vcxproj]
..\fs-ext.cc(282): error C3861: 'uv_get_osfhandle': identifier not found [C:\Users\mathieub\Devs\uw-hub-floating\node_modules\fs-ext\build\fs-ext.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\mathieub\Devs\uw-hub-floating\node_modules\electron-rebuild\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\mathieub\\Devs\\uw-hub-floating\\node_modules\\electron-rebuild\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=1.7.10" "--arch=x64" "--dist-url=http
s://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd C:\Users\mathieub\Devs\uw-hub-floating\node_modules\fs-ext
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

@davedoesdev
Copy link
Contributor

davedoesdev commented Jan 8, 2018

@Mic75 is that Node v8.9.4 in the logs?

Anyway, it compiles for me on Windows 10, Node v8.9.1:

C:\tmp>npm install fs-ext

> [email protected] install C:\tmp\node_modules\fs-ext
> node-gyp configure build


C:\tmp\node_modules\fs-ext>if not defined npm_config_node_gyp (node "C:\Users\Lucie\AppData\Roaming\nvm\v8.9.1\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build )  else (node "" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
     Creating library C:\tmp\node_modules\fs-ext\build\Release\fs-ext.lib and o
  bject C:\tmp\node_modules\fs-ext\build\Release\fs-ext.exp
  Generating code
  Finished generating code
  fs-ext.vcxproj -> C:\tmp\node_modules\fs-ext\build\Release\\fs-ext.node
npm WARN saveError ENOENT: no such file or directory, open 'C:\tmp\package.json'npm notice created a lockfile as package-lock.json. You should commit this file.npm WARN enoent ENOENT: no such file or directory, open 'C:\tmp\package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.

+ [email protected]
added 2 packages in 8.297s

C:\tmp>node --version
v8.9.1

@Mic75
Copy link

Mic75 commented Jan 8, 2018

@davedoesdev, yep, it's Node v8.9.4. But this version is not relevant here, because the rebuild is made with electron's Node version (which is a 8.2.1 for electron 1.7.10).

I do confirm that fs-ext is also properly compiled with electron's node version (8.2.1), but somehow, the rebuild keeps failing. That's the reason I am asking here, there is probably something broken in electron-rebuild, but I can't figure out what.

@Mic75
Copy link

Mic75 commented Jan 8, 2018

My mistake, electron 1.7.10 come with node 7.9.0. Sorry for the noise.

@baudehlo
Copy link
Owner

baudehlo commented Jan 8, 2018 via email

@Mic75
Copy link

Mic75 commented Jan 8, 2018

@baudehlo Thanks. Actually I just did a wrong assumption about the node version embedded. Electron 1.7.10 embeds Node 7.9.0 (not 8.2.1 like I first thought),

@davedoesdev
Copy link
Contributor

@Mic75 ah! Is there a more recent version of Electron with Node 8?

@Mic75
Copy link

Mic75 commented Jan 8, 2018

Yes, 1.8.1, but it's flagged as a beta version.

@davedoesdev
Copy link
Contributor

Hopefully fs-ext compiles fine with that, fingers crossed.

@CerratoA
Copy link

CerratoA commented Apr 3, 2018

I read the thread but I cound't find the final solution to installing in win 10. was it node version?

@Mic75
Copy link

Mic75 commented Apr 3, 2018

@CerratoA yes, node version >= 8.2 is working.

@CerratoA
Copy link

I solved it by installing windows build tools with the next commant:
npm install --global --production windows-build-tools
After that I tried again npm install which game error again and then I ran this command:
npm config set msvs_version 2015
After those 2 commands npm install worked for me.

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

10 participants