-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Couldn't find preset "./.babelrc.js" relative to directory "/node_modules/react-virtualized" #1112
Comments
{
test: /\.js$/,
exclude: /node_modules/, // add this line
loader: 'babel-loader'
} |
@TrySound , thank you. I didn't know about this. Feel silly now :) |
I have the same issue during the running tests in jest. Any suggestions? |
@GlebDolzhikov same answer. Do not transpile node_modules |
@TrySound I had the same issue, adding that line resolved the issue. Thanks for posting 👍 |
But as i understand it's a part of webpack config? My test environment doesn't use webpack, i try to add transformIgnorePatterns to jest.config - in vain |
Just skip this option. |
doesn't work for me, finish it up by fixed "react-virtualized": "9.18.5", |
@GlebDolzhikov Could you create reproducing repository? |
Will try when I have some spare time;) |
same error. and i set include ref: #1112 (comment) |
@geminiyellow Show config |
Faced with the same error. The proposed solution for excluding node_modules folder is not working for me - I have several dependencies that are not being transpiled for non-es6 usage. So I ended up having the configuration like this:
|
I had this issue while running Jest tests, but it was my fault so I'm leaving it here for anyone else who has the same issue. I am locked to an earlier version of React (15.x) and thereby an old version of To shrink our bundle we used the method pointed out here #427 (comment) and imported import { MultiGrid } from 'react-virtualized/dist/es/MultiGrid'; But this caused this error to happen with Jest, once I changed the import to: import { MultiGrid } from 'react-virtualized/dist/commonjs/MultiGrid'; The problem went away and was being properly transpiled |
@zgriesinger es output will be bundled with less noise in the output bundle. To solve the issue with jest you can use jest mocking
|
Worked perfectly thanks! |
getting the same error as above:
and webpack is setup this way too:
What's causing this issue? |
You can add this option in package.json in root of your project to exclude your libraries like Example: |
This alternative of |
Re: #1112 (comment), is it necessary to mock these in every one of my tests which are failing? Or is there a better way to do this globally? |
This seems like a bug to me. Being as I'm not sure what use the The reason it's particularly broken is because
|
I get the following error while trying to compile with the latest version (9.19.0).
The text was updated successfully, but these errors were encountered: