transloadit / uppy

The next open source file uploader for web browsers :dog:

Home Page:https://uppy.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to parse source map from @transloadit\prettier-bytes\src\prettierBytes.ts

royibernthal opened this issue · comments

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

Install the following packages (probably @uppy/core and @uppy/transloadit would be enough):

"@uppy/core": "^3.9.3",
"@uppy/dashboard": "^3.7.5",
"@uppy/drag-drop": "^3.0.3",
"@uppy/file-input": "^3.1.0",
"@uppy/progress-bar": "^3.1.0",
"@uppy/react": "^3.2.2",
"@uppy/transloadit": "^3.5.1",
"@uppy/tus": "^3.5.3",

@transloadit/prettier-bytes version in package.json is 0.3.1

Expected behavior

No warnings/errors

Actual behavior

I'm getting the following warning:

Compiled with warnings.

Failed to parse source map from 'project-path\node_modules\@transloadit\prettier-bytes\src\prettierBytes.ts' file: Error: ENOENT: no such file or directory, open 'project-path\node_modules\@transloadit\prettier-bytes\src\prettierBytes.ts'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

WARNING in ./node_modules/@transloadit/prettier-bytes/dist/prettierBytes.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'project-path\node_modules\@transloadit\prettier-bytes\src\prettierBytes.ts' file: Error: ENOENT: no such file or directory, open 'project-path\node_modules\@transloadit\prettier-bytes\src\prettierBytes.ts'

webpack compiled with 1 warning
No issues found.

Hi, we had a report about this recently and upgrading the package fixed it for everyone at the time: #4933.

I can't reproduce with out local setup nor in our CodeSandbox examples. We also test against all major bundlers in CI.

Do you have a reproducible example on CodeSandbox/StackBlitz?

Hey, I was able to isolate and reproduce this locally:
https://github.com/royibernthal/uppy-repro

I see, it's just a warning, and this has been fixed already in transloadit/monolib#54. It's not published yet but I'll make sure it us.

new prettier-bytes has been released.

That's great. After reinstalling@uppy/core, its @transloadit/prettier-bytes dependency still resolves to 0.3.1 according to package-lock.json and the warning naturally persists. Any idea why?

We define a flexible semver range so it should be picked up automatically on a fresh install. If you existing lock file defines 0.3.1 then you need to solve that yourself, depending on your package manager, or just delete the whole lock file and install again.

Fair enough got it, thanks for the quick resolution :)