Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uppy/core 3.3.1 throws error after new build #4940

Closed
2 tasks done
okkan opened this issue Feb 20, 2024 · 12 comments · Fixed by #4949
Closed
2 tasks done

uppy/core 3.3.1 throws error after new build #4940

okkan opened this issue Feb 20, 2024 · 12 comments · Fixed by #4949
Labels

Comments

@okkan
Copy link

okkan commented Feb 20, 2024

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

we have been using 3.3.1 version for a long time, previous builds are working but today we built our env. uppy threw error.

...
just install @uppy/core 3.3.1 with
"@uppy/aws-s3": "3.2.1",
"@uppy/dashboard": "3.5.0",
"@uppy/drag-drop": "3.0.2",
"@uppy/file-input": "3.0.2",
"@uppy/progress-bar": "3.0.2",
"@uppy/react": "3.1.3",
"@uppy/tus": "3.1.2",

Expected behavior

it should work as expected

Actual behavior

it throws Error: Cannot find module '@uppy/core/lib/EventManager.js'

@okkan okkan added the Bug label Feb 20, 2024
@Murderlon
Copy link
Member

I can't reproduce here on the latest versions: https://codesandbox.io/p/sandbox/uppy-dashboard-xpxuhd?file=%2Fsrc%2Findex.js%3A28%2C23

Do you have a reproducible example on CodeSandbox or StackBlitz?

@okkan
Copy link
Author

okkan commented Feb 21, 2024

i dont have an example right now, also we cant use latest version because of p-queue issue (it doesnt work with meteorjs, #4637), only working version was 3.3.1, without any change about uppy, our build started to throw error. Possibly you made a mistake with old versions.

@Murderlon
Copy link
Member

Note that it's impossible to override versions on npm, so making a "mistake with old versions" can't be the case.

Uppy is ESM-only, as is p-queue, so it might be a bundler issue with meteorjs?

@okkan
Copy link
Author

okkan commented Feb 21, 2024

ok we found the solution,

we didnt have @uppy/utils in package.json, so it was using the latest version of it, we added it then we got another error about aws-s3-multipart, same thing we didnt have it in package.json even we dont use it, then we added it to package.json with the compatible version, it fixed.

sorry for taking your time.

@okkan okkan closed this as completed Feb 21, 2024
@Murderlon
Copy link
Member

You shouldn't put @uppy/utils in your package.json, it's an internal-only package and all packages that need it have it in their dependencies already.

Trying to manually resolve our internal dependencies will give you more problems sooner or later, it's probably better to look into your bundler.

@okkan
Copy link
Author

okkan commented Feb 21, 2024

but when we dont put it, it uses latest version of it and latest version of utils is not compatible with our 3.3.1 core version

@rschlack
Copy link

Hi Murderlon, I work with Okkan. If we don't put the @uppy/utils in our package file then utils/EventManager.js contains this line of code which references a file that does not exist in 3.3.1 core.

export { default } from '@uppy/core/lib/EventManager.js'

@Murderlon
Copy link
Member

Our policy for breaking changes considers features/fixes which require changes across multiple packages to work not breaking. That means you should always upgrade packages together, not separately. You should either pin all the versions that work for you and stay on there or always upgrade packages together. You can't pin core and then keep installing newer versions of the other packages.

If you must, it's probably better to use overrides for npm or resolutions for yarn.

@okkan
Copy link
Author

okkan commented Feb 21, 2024

we didnt update or upgrade any package of uppy, you made a change in uppy/utils and it doesnt work with 3.3.1 so we had to put its an old version to package.json.

@Murderlon
Copy link
Member

I'll talk to the team to see if something when wrong with versioning here.

@Murderlon
Copy link
Member

EventManager is back in utils so if it resolved to the latest in your build then everything should be fine.

#4952

@rschlack
Copy link

Thank you. This solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants