aave / aave-utilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

math-utils missing/broken sourcemaps files

kenkunz opened this issue · comments

Bug Report

@aave/math-utils / 1.20.0

Description

Sourcemaps are broken on the npm module for @aave/math-utils b/c the source files cannot be found.

Steps to reproduce

  1. Install @aave/math-utils in a project:
    npm i @aave/math-utils
  2. Import it into a Vite-based project (or some other bundler / build famework) with sourcemaps enabled
  3. Run your project in dev mode:
    npm run dev
  4. View sources in browser dev tools – note that sourcemaps did not load
    image
  5. Also note error output when running tests (I'm using vitest):
    Sourcemap for "/Users/ken/Code/tradingstrategy/frontend/node_modules/@aave/math-utils/dist/esm/index.js" points to missing source files
    [ similar error messages for other files ]
    

Expected behavior

Source files can be inspected; tests run without sourcemap errors.

Environment

  • OS: macOS Ventura 13.5.1
  • Node/npm version: v18.14.2
  • Browser: Chrome 116.0.5845.140

Additional context / screenshots

FYI, this issue is still present with the latest release (1.24.0). It requires a trivial 1-line code change to package.json (see #560).