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

J.getInterceptor$ax(...).map$1$1 is not a function even without Jest #2531

Open
YodasWs opened this issue Mar 2, 2025 · 2 comments
Open

Comments

@YodasWs
Copy link

YodasWs commented Mar 2, 2025

I'm trying to use gulp-sass to compile my Sass, but I'm getting this error:

J.getInterceptor$ax(...).map$1$1 is not a function

Searching Google tells me this is an error in Jest, except I'm not using Jest. I don't have Jest as a dependency of any node modules used in my project. But I do see that the function is used in sass.dart.js:

 164 (function dartProgram() {
       ⁝
 358   var J = {
         ⁝
1091     map$1$1$ax(receiver, a0, $T1) {
1092       return J.getInterceptor$ax(receiver).map$1$1(receiver, a0, $T1);
1093     },

And, yes, your own README.md points out the fix:

… you'll need to install jest-environment-node-single-context and add testEnvironment: 'jest-environment-node-single-context' to your Jest config.

But if I'm not the one adding and using Jest, then I don't know where to fix this.

@YodasWs
Copy link
Author

YodasWs commented Mar 3, 2025

I tried installing jest-environment-node-single-context to my project and added the following to package.json:

"jest": {
  "testEnvironment": "jest-environment-node-single-context"
},

but that did not stop the compile error.

I went into node_modules/sass to install jest-environment-node-single-context and also add the config to node_modules/sass/package.json, but that, too, did not stop the compile errorr.

@YodasWs YodasWs changed the title J.getInterceptor$ax(...).map$1$1 is not a function J.getInterceptor$ax(...).map$1$1 is not a function even without Jest Mar 3, 2025
@nex3
Copy link
Contributor

nex3 commented Mar 4, 2025

Can you provide a reproduction of this that just uses the Sass API, without going through an intermediate library like Gulp?

@nex3 nex3 added the needs info label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants