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

Fails on Windows #6

Closed
ilg-ul opened this issue Nov 11, 2019 · 4 comments · Fixed by #7
Closed

Fails on Windows #6

ilg-ul opened this issue Nov 11, 2019 · 4 comments · Fixed by #7
Labels

Comments

@ilg-ul
Copy link

ilg-ul commented Nov 11, 2019

I initially used version 0.1.0 and everything was fine, but after upgrading to higher versions, on Windows the module fails with a message like

test/tap/020-checker.js ............................. 34/35
  outdated version untuned
  not ok ENOENT: no such file or directory, lstat 'C:\Users\ilg\AppData\Roaming\npm\node_modules'
    stack: >
      Error:
          Object.<anonymous> (node_modules/is-installed-globally/index.js:8:29)
          Object.Module._compile (node_modules/source-map-support/source-map-support.js:541:25)
    errno: -4058
    syscall: lstat
    code: ENOENT
    path: C:\Users\ilg\AppData\Roaming\npm\node_modules
    tapCaught: returnedPromiseRejection
    test: outdated version untuned

total ............................................... 40/42

The problem was introduced since 0.2.0.

It would probably be useful to run CI not only on Linux, but on Windows too (I use AppVeyor, but I think Travis also added support for Windows).

@sindresorhus
Copy link
Owner

// @vladimyr

@vladimyr
Copy link

I'm afraid I can't help you with this one. I don't use Windows and don't have any Win machine to test on. Best thing I could do is to boot a vm but that's kinda unreliable. 🤷‍♂️

@ilg-ul
Copy link
Author

ilg-ul commented Nov 13, 2019

boot a vm but that's kinda unreliable.

If you install the official Microsoft Windows 10 ISO in a VirtualBox machine, it is quite reliable, I have two Windows VMs (32/64-bit), plus several 32/64-bit Linux VMs (I'm on Mac) and this is how I test my modules on all platforms; Windows 10 will complain about the missing activation, but for occasional tests it is ok.

Once you fix the problem, you can add a set of CI Windows tests, for example in the project using your module I have the following AppVeyor configuration file:

https://github.com/xpack/update-checker-js/blob/master/.appveyor.yml

@ilg-ul
Copy link
Author

ilg-ul commented Nov 13, 2019

BTW, you problem seems related to the weird Windows paths.

And most probably is inherited from the dependencies (global-dirs?)

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

Successfully merging a pull request may close this issue.

3 participants