Giter Club home page Giter Club logo

Comments (9)

joyce-4i avatar joyce-4i commented on June 23, 2024 3

I also have this problem. I was trying search a solution but i don't find. The community needs a solution for this problem.
image

from node-xlsx.

dafanzhi avatar dafanzhi commented on June 23, 2024 2

I followed the SheetJS/sheetjs#2822 and reinstalled the xlsx, but still got the same vulnerability tips:
image
What should i do?
I don't know what's the relationships between the node-xlsx and xlsx, can you help to provide detailed instructions?
Thanks a lot!

from node-xlsx.

Cellule avatar Cellule commented on June 23, 2024 1

See SheetJS/sheetjs#2822 for discussion/information about how to update

from node-xlsx.

jonathan-4iTester avatar jonathan-4iTester commented on June 23, 2024

@mgcrea , any news?

from node-xlsx.

milpalabras avatar milpalabras commented on June 23, 2024

until @mgcrea fix this vulnerabilities, you can override in packaje.json to use the last xlxs module without vulnerabilities (need remove node-xlsx and reinstall again with the override version in packaje,json)
see: https://docs.sheetjs.com/docs/getting-started/installation/nodejs/

from node-xlsx.

dafanzhi avatar dafanzhi commented on June 23, 2024

@milpalabras, i specified the overrides in the package.json:
image

then removed the xlsx and node-xlsx, and resintall them:
image

Still got the same result.
Can you help to provide detailed instructions to install node-xlsx and eliminate the vulnerabilities error tips?

from node-xlsx.

WilhelmStein avatar WilhelmStein commented on June 23, 2024

I made a fork and updated the dependency, but then two tests broke. In inspecting them, I noticed that the tests were only checking the first 10 bytes of the files, which I found a bit odd.

In any case, there seems to be a discrepancy between the 5th byte of the fixture files and the output from the xlsx package. I took a look with a hex editor, and the first 4 bytes seem to conform to the .xlsx file format. I am having some trouble understanding what that change signifies in the 5th byte.

 FAIL  test/specs/build.spec.ts
  ● Console

    console.debug
      Deprecated options['!merges'], please use options.sheetOptions['!merges'] instead.

      at src/index.ts:86:15
          at Array.filter (<anonymous>)

  ● node-xlsx builder › should properly build an XLSX from

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

    @@ -2,11 +2,11 @@
        "data": Array [
          80,
          75,
          3,
          4,
    -     10,
    +     20,
          0,
          0,
          0,
          0,
          0,

      14 |     expect(result instanceof Buffer).toBeTruthy();
      15 |     // Only check the ten first bytes
    > 16 |     expect(result.slice(0, 10)).toEqual(expected.slice(0, 10));
         |                                 ^
      17 |   });
      18 |   it('should handle !merges sheetOption', () => {
      19 |     const expected = readBufferFixture(`sheetOptions.xlsx`);

      at Object.<anonymous> (test/specs/build.spec.ts:16:33)

  ● node-xlsx builder › should handle !merges sheetOption

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

    @@ -2,11 +2,11 @@
        "data": Array [
          80,
          75,
          3,
          4,
    -     10,
    +     20,
          0,
          0,
          0,
          0,
          0,

      22 |     expect(result instanceof Buffer).toBeTruthy();
      23 |     // Only check the ten first bytes
    > 24 |     expect(result.slice(0, 10)).toEqual(expected.slice(0, 10));
         |                                 ^
      25 |   });
      26 |   it('should handle global sheet options', () => {
      27 |     const worksheets = JSON.parse(readFixture(`test.json`));

      at Object.<anonymous> (test/specs/build.spec.ts:24:33)

from node-xlsx.

mgcrea avatar mgcrea commented on June 23, 2024

Just published the v0.22.0 release with updated deps, should fix your issues.

from node-xlsx.

dafanzhi avatar dafanzhi commented on June 23, 2024

The issue still exists in v0.22.0:

➜ bodhi git:(3.5.11) ✗ npm rm node-xlsx
removed 10 packages and audited 210 packages in 2.095s

14 packages are looking for funding
run npm fund for details

found 1 moderate severity vulnerability
run npm audit fix to fix them, or npm audit for details

╭───────────────────────────────────────────────────────────────╮
│ │
│ New major version of npm available! 6.14.12 → 9.6.7 │
│ Changelog: https://github.com/npm/cli/releases/tag/v9.6.7
│ Run npm install -g npm to update! │
│ │
╰───────────────────────────────────────────────────────────────╯

➜ bodhi git:(3.5.11) ✗ npm rm xlsx
removed 5 packages and audited 209 packages in 1.931s

14 packages are looking for funding
run npm fund for details

found 1 moderate severity vulnerability
run npm audit fix to fix them, or npm audit for details
➜ bodhi git:(3.5.11) ✗ npm install [email protected]

  • [email protected]
    added 7 packages from 2 contributors, removed 1 package, updated 3 packages and audited 219 packages in 2.968s

14 packages are looking for funding
run npm fund for details

found 2 vulnerabilities (1 moderate, 1 high)
run npm audit fix to fix them, or npm audit for details

from node-xlsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.