buge / ts-units

Physical Units for TypeScript
Apache License 2.0
24 stars 7 forks source link

Failed to parse source map #67

Open hellow554 opened 1 year ago

hellow554 commented 1 year ago

Hey buge,

thanks a lot for this library, I really appreciate it :)

When I add this library via yarn add @buge/ts-units, then do yarn install and yarn start, I receive the following errors:

Failed to parse source map from '/home/marcel/projects/scale_valve/frontend/.yarn/cache/@buge-ts-units-npm-1.2.2-9c71d2edc8-8b1be825cf.zip/node_modules/@buge/src/dimension.ts' file: Error: ENOENT: no such file or directory, open '/node_modules/@buge/src/dimension.ts'
Failed to parse source map from '/home/marcel/projects/scale_valve/frontend/.yarn/cache/@buge-ts-units-npm-1.2.2-9c71d2edc8-8b1be825cf.zip/node_modules/@buge/src/exponent.ts' file: Error: ENOENT: no such file or directory, open '/node_modules/@buge/src/exponent.ts'
Failed to parse source map from '/home/marcel/projects/scale_valve/frontend/.yarn/cache/@buge-ts-units-npm-1.2.2-9c71d2edc8-8b1be825cf.zip/node_modules/@buge/src/mass/dimension.ts' file: Error: ENOENT: no such file or directory, open '/node_modules/@buge/src/mass/dimension.ts'
Failed to parse source map from '/home/marcel/projects/scale_valve/frontend/.yarn/cache/@buge-ts-units-npm-1.2.2-9c71d2edc8-8b1be825cf.zip/node_modules/@buge/src/mass/index.ts' file: Error: ENOENT: no such file or directory, open '/node_modules/@buge/src/mass/index.ts'
Failed to parse source map from '/home/marcel/projects/scale_valve/frontend/.yarn/cache/@buge-ts-units-npm-1.2.2-9c71d2edc8-8b1be825cf.zip/node_modules/@buge/src/unit.ts' file: Error: ENOENT: no such file or directory, open '/node_modules/@buge/src/unit.ts'

If we take a look at the published dimension.js.map, there is this:

{"version":3,"file":"dimension.js","sourceRoot":"","sources":["../src/dimension.ts"],"...}

but that file won't get published.

Is there a way you can fix this? :)

Many thanks!