I’m trying to use Handsontable with NuxtJS (VueJS) and HyperFormula.
Handsontable works fine but I can’t event import HyperFormula.
Node.JS 20.10.0
PNPM 9.4.0
When I do this :
import { HyperFormula } from 'hyperformula';
I instantly get an error :
ERROR Cannot convert undefined or null to object at Function.values (<anonymous>) at TranslationPackage.checkErrors ([email protected]_moduleshyperformulaesi18nTranslationPackage.js:91:30) at new TranslationPackage ([email protected]_moduleshyperformulaesi18nTranslationPackage.js:20:10)
These are my versions :
"dependencies": {
"@handsontable/vue3": "^14.4.0",
"hyperformula": "^2.7.0",
"nuxt": "^3.12.2",
"vue": "^3.4.29"
}
I really can’t find what I’m doing wrong…
Could someone help me ?
2
Answers
Make sure you have installed the hyperformula package correctly in
your project. You can try reinstalling it using the following
command:
If you are using a module bundler like Webpack or Vite, ensure that
it is configured correctly to handle the hyperformula package. Check
if there are any specific configuration settings required for
HyperFormula.
Try importing HyperFormula using the default import syntax instead
of named imports:
If the above steps don’t resolve the issue, you can try using a
dynamic import to load HyperFormula asynchronously:
Here’s a demo that combines NuxtJS and HyperFormula within Handsontable https://stackblitz.com/edit/nuxt-starter-7hvjkp?file=components%2FGrid.vue,package.json,data.ts