-
Notifications
You must be signed in to change notification settings - Fork 832
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
"export 'default' (imported as 'clsx') was not found in 'clsx' #894
Comments
Do you have {
"compilerOptions": {
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
}
} |
Hi, Nope I did not, tho after I added it i got this: error TS5023: Unknown compiler option 'esModuleIntertop'. |
Oh nvm saw that you had a typo in the code, esModuleIntertop should be esModuleInterop. Then i change my answer, yes i have it in tsconfig, tho still the same problem. |
I have same error |
Should clsx be a dependency in the package.json? |
It is |
Right, I was looking in the main package and not the lib.... Interesting to note that I went into the package.json of clsx and changed: "module": "dist/clsx.mjs", to "module": "dist/clsx.js", It compiled and worked again. |
|
Hi @dmtrKovalenko, I have done removing npm_modules folder and re-installing. Also all imports are at beginnig of file and no changes done after adding material-ui-picker, Still having the same error -
I am having no clue about error further, Kindly suggest. |
Hi, I tested it without redux-form just as normal form as well, Still getting the same error. When i remove following lines everything works as before.
Here is my package.json
Is it related with react or material ui version? |
It's worked after i changed "module": "dist/clsx.mjs", to "module": "dist/clsx.js", in pakage.json (path to file: node_modules/clsx/package.json). |
@storesbuzz Do you use only webpack or webpack with typescript? |
I am using only webpack. |
Seems like the problem is mixing mjs and module field. Webpack sucks with mjs. |
Reverted to Thanks @TrySound for alerting me. |
Hi @dmtrKovalenko even if i upgrade [email protected], i still have the same error like @storesbuzz. May be because your package.json still using [email protected] ? |
@NYannick You need to remove material-ui-pickers and install again to upgrade transitive dependencies. |
Tell us if this will work for you. |
It work thank you @TrySound |
Cool. Thanks |
I'm use with Typescript, and it have error: |
Have you tried following this suggestion? Sorry, we can't provide any further support beyond that as this package is no longer supported. |
Environment
material-ui-pickers: "2.1.2",
"@material-ui/core": "3.9.0",
"react": "16.4.2",
"typescript": "3.0.1",
Browser: Chrome
Steps to reproduce
"export 'default' (imported as 'clsx') was not found in 'clsx'
The only difference between the error messages is that it refers to different lines etc.
But if I import it like this: import { InlineDatePicker } from 'material-ui-pickers/DatePicker';
I get no error message and it says that it compiles successfully, tho I only see a white page where all other components are gone.
Expected behavior
To compile.
Actual behavior
Only error messages and it fails to compile.
The text was updated successfully, but these errors were encountered: