skip to Main Content

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


    1. Make sure you have installed the hyperformula package correctly in
      your project. You can try reinstalling it using the following
      command:

      npm install hyperformula
      
    2. 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.

    3. Try importing HyperFormula using the default import syntax instead
      of named imports:

      import HyperFormula from 'hyperformula';
      
    4. If the above steps don’t resolve the issue, you can try using a
      dynamic import to load HyperFormula asynchronously:

      let HyperFormula;
      
      async function loadHyperFormula() {
        HyperFormula = await import('hyperformula');
      }
      
      // Call the loadHyperFormula function before using HyperFormula
      await loadHyperFormula();
      
    Login or Signup to reply.
  1. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search