-
Notifications
You must be signed in to change notification settings - Fork 224
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 find module 'source-map' from 'source-map-support.js' #265
Comments
Exact same problem. I created a minimal project to try to troubleshoot the problem, basically with sum.js and sum.test.js. When I run the test, it fails with the below message:
My versions: |
@cmf-joo This problem was not related to source map support. did you run your project any Network or Ram Disk Path like virtual computer? |
My project is set up on a local folder on a local machine. Were you able to find a solution? |
This appears to be 1/2 a NYC issue istanbuljs/nyc#1323 Exploring further I can see that there is a logic error in nyc for the include flag https://github.com/istanbuljs/nyc/blob/992359a1e2108906e28324058008f28aa1052dc1/index.js#L133
will load the source maps library but line numbers are still incorrect. Probably because the source map library hooks require improperly in NYC? Meanwhile looking at NYC and its instrument code the source map flags seem completely super broken ( there is no particular logic to toggling them on and off and making a Boolean chart of the results ) and I can not imagine where to look to figure out why simply including source mapping options on results in failing to cover anything as the instrument files look ~ the same just including or not including source map comments. ( Unless as I type this I am thinking requiring the library to handle source maps is breaking NYCs require hook ) I think the issue is non standard hooking of require but Im not sure |
I am created react project by using npx create-react-app. I have installed jest package for unit test. when I was run unit test, this Cannot find module 'source-map' from 'source-map-support.js' error occur. I couldn't find any solution. Please do the needful.
I have tried reinstall source map support module but no use on that.
The text was updated successfully, but these errors were encountered: