-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGrid] Build error: "Cannot find module '../../..'" and "Cannot find namespace 'Chai'" #573
Comments
@Murloc6 Thanks for raising. What do you think about this fix? diff --git a/packages/grid/_modules_/grid/utils/mergeOptions.ts b/packages/grid/_modules_/grid/utils/mergeOptions.ts
index b78cac72..26395f36 100644
--- a/packages/grid/_modules_/grid/utils/mergeOptions.ts
+++ b/packages/grid/_modules_/grid/utils/mergeOptions.ts
@@ -20,7 +20,7 @@ export function mergeColTypes(
return hydratedOptionColTypes;
}
-export function removeUndefinedProps(options: Object) {
+export function removeUndefinedProps(options: Object): Object {
const cleanedOptions = { ...options };
Object.keys(options).forEach((key) => {
if (options.hasOwnProperty(key) && options[key] === undefined) { Do you want to work on a pull request? :) |
Thank you for your quick answer! This fix the second error, which is :
To be honest I don't really understand why but it works :). But the first error is still there :
It seems to be related to the
And the Nevertheless, I do not know how to fix this... |
https://unpkg.com/@material-ui/[email protected]/dist/data-grid.d.ts Hum, maybe we should go back to using the build infrastructure of the core components, or at least, to improve the CI to fail. It's the second time we have this problem, not a 3rd! |
It looks like the problem appeared because of the "paths" in the tsconfig.js. I read this article https://www.techatbloomberg.com/blog/10-insights-adopting-typescript-at-scale/ and if you read the chapter 4, the problem seems exactly the same. They solved this issue by using I am not sure this is a trivial solution. If you have a simpler solution I am in :). Thank you again for your help. |
Hello. The Chai issue is to me, related to spec not being ignored. diff --git a/packages/grid/tsconfig.build.json b/packages/grid/tsconfig.build.json
index b6e476a..48bc355 100644
--- a/packages/grid/tsconfig.build.json
+++ b/packages/grid/tsconfig.build.json
@@ -10,5 +10,5 @@
"rootDir": "./"
},
"include": ["./data-grid/src", "./x-grid/src", "./_modules_/**/*"],
- "exclude": ["__tests__", "**/*.test.ts", "node_modules"]
+ "exclude": ["__tests__", "**/*.test.*", "node_modules"] |
Getting this error during the deploy. But no issue when run it locally.
|
I have the same issue as above -> @mui/x-data-grid/index-cjs.js' implicitly has an 'any' type. I'm using "@mui/x-data-grid": "^5.0.0-beta.7" Can you tell when we can expect a fix for that issue ? |
I tried to use the Data-grid component (which is super awesome by the way!).
I installed it from npmjs (
npm install --save @material-ui/data-grid
) and import it in my project. I discovered some build errors, corresponding to module import.Current Behavior 😯
I use the data-grid component in my project with the following code :
I run the
npm run build
and the following errors occured :Despite these errors, the build finished and the rendering is exactly what I excepted.
Expected Behavior 🤔
I expected to have the exact same render but without any errors.
Steps to Reproduce 🕹
Steps:
Context 🔦
These errors during the build is not a good thing since I build this project in a CI and it does not allow errors during builds.
Your Environment 🌎
tsconfig.json :
The text was updated successfully, but these errors were encountered: