grid
                                
                                
                                
                                    grid copied to clipboard
                            
                            
                            
                        Runtime JavaScript error with v8.0.8
I have been successfully using v7.0.1 from npm.
But when I updated to v8.0.8 I get a JavaScript error in Chrome's console (see attached image), as soon as I have the Grid imported on my page.
Any suggestions what may cause it? Has the build/publish process changed after v7.0.1?
There was no significant changes in v8. What version of typescript are you using ? How are you importing the grid?
I'm using TypeScript 4.2.3, and here's how I import the grid: import { autoSizerCanvas, CellInterface, Grid, GridRef, Cell, RendererProps, UseEditableOptions, useEditable, useSelection, } from "@rowsncolumns/grid";
If I compile your code in my dev environment, it works.
I guess some import might be conflicting.. Can you share your tsconfig settings.. If you could reproduce this on codesandbox, will be helpful
I just looked at the generated JS-file for grid. There seems to be a difference in the module loading.
Here's the old snippet: var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; };
Here's the new snippet (v8.0.8): var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; };
Maybe you have used a different version of tsc when building/publishing?
I dont have a way to reproduce this. You can share your tsconfig.json or use codesandbox to reproduce this error.
Unfortunately, I didn't manage to reproduce the error in codesandbox.
Here's my tsconfig.json:
{ "extends": "../tsconfig.settings.json", "compilerOptions": { "outDir": "lib", "rootDir": "src", "lib": ["dom", "es2015", "es2017.object", "esnext.asynciterable", "esnext"] } }
tsconfig.settings.json:
{ "compilerOptions": { "target": "es5", "module": "commonjs", "declaration": true, "declarationMap": true, "sourceMap": true, "composite": true, "esModuleInterop": true, "downlevelIteration": true, "jsx": "react", "newLine": "LF", "noEmitOnError": false, "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitReturns": true, "noImplicitThis": true, "noUnusedLocals": true, "noUnusedParameters": true, "strictNullChecks": true, "lib": ["esnext"], "noErrorTruncation": true } }