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

tests fail on node >= v12.16.0 #28

Closed
davidfirst opened this issue Jun 1, 2020 · 2 comments
Closed

tests fail on node >= v12.16.0 #28

davidfirst opened this issue Jun 1, 2020 · 2 comments

Comments

@davidfirst
Copy link

davidfirst commented Jun 1, 2020

I get the error below when running npm test. I verified with multiple node versions and it happens only on versions >= v12.16.0.
This issue happens also on projects that depend on this module, such as filling-cabinet.

➜  node-module-lookup-amd git:(master) ✗ npm test

> module-lookup-amd@6.2.0 test /Users/davidfirst/temp/projects/node-module-lookup-amd
> jscs index.js test bin && mocha test/test.js

/Users/davidfirst/temp/projects/node-module-lookup-amd/node_modules/requirejs/bin/r.js:1
(function (exports, require, module, __filename, __dirname) { #!/usr/bin/env node
                                                              ^

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:88:7)
    at createScript (vm.js:263:10)
    at Object.runInThisContext (vm.js:311:10)
    at wrapSafe (internal/modules/cjs/loader.js:1058:15)
    at Module._compile (internal/modules/cjs/loader.js:1121:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at /Users/davidfirst/temp/projects/node-module-lookup-amd/index.js:9:19
    at Object.<anonymous> (/Users/davidfirst/temp/projects/node-module-lookup-amd/index.js:258:4)
@davidfirst
Copy link
Author

davidfirst commented Jun 5, 2020

After some debugging, the issue is coming from the rewire package.
They have an open issue about it: jhnns/rewire#178.

In this repo, I don't see why rewire is needed for the tests, it can be removed altogether.

@davidfirst davidfirst changed the title tests fail on node >= v12.6.0 tests fail on node >= v12.16.0 Jun 5, 2020
@mrjoelkemp
Copy link
Collaborator

Thanks @davidfirst! I appreciate the help figuring out the issue. I subscribed to the issue and will push a fix when they release the patch.

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