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

Cannot run tests on Windows #3707

Closed
1 of 2 tasks
Download opened this issue Nov 25, 2020 · 2 comments
Closed
1 of 2 tasks

Cannot run tests on Windows #3707

Download opened this issue Nov 25, 2020 · 2 comments

Comments

@Download
Copy link
Contributor

You want to:

  • report a bug
  • request a feature

Current behaviour

When I run npm test after git cloning and npm installing this repo, I get:

C:\ws\socketio>npm test

> socket.io@3.0.3 test C:\ws\socketio
> npm run format:check && npm run compile && nyc mocha --require ts-node/register --reporter spec --slow 200 --bail --timeout 10000 test/socket.io.ts


> socket.io@3.0.3 format:check C:\ws\socketio
> prettier --check "lib/**/*.ts" "test/**/*.ts"

Checking formatting...
All matched files use Prettier code style!

> socket.io@3.0.3 compile C:\ws\socketio
> rimraf ./dist && tsc

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'C:\ws\socketio\node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|
npm ERR! Test failed.  See above for more details.

I traced this down to this issue in nyc, which is fixed in 15.0.0+.

Steps to reproduce (if the current behaviour is a bug)

On a Windows 10 computer:

  • Clone project
  • npm install
  • npm test

Expected behaviour

Should run the tests.

Setup

  • OS: Windows 10
  • browser: n/a/
  • socket.io version: master

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Preparing a PR to fix this

@Download
Copy link
Contributor Author

This PR fixes the issue for me: #3708

@Download
Copy link
Contributor Author

Download commented Dec 3, 2020

Fixed by merging #3708

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