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

Can't resolve '@uppy/core/lib/UploaderPlugin.js #5157

Open
2 tasks done
bhavesh2510 opened this issue May 10, 2024 · 10 comments
Open
2 tasks done

Can't resolve '@uppy/core/lib/UploaderPlugin.js #5157

bhavesh2510 opened this issue May 10, 2024 · 10 comments
Labels

Comments

@bhavesh2510
Copy link

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

Getting this error suddenly, when i install uppy through pnpm

`Can't resolve '@uppy/core/lib/UploaderPlugin.js' in

'/Users/bhaveshsawayo/sawayo-ui/node_modules/.pnpm/@UPPY+xhr-upload@3.3.1_@uppy+core@3.11.2/node_modules/@uppy/xhr-upload/lib'```

Here is package.json details

"@uppy/aws-s3": "^3.6.2",
"@uppy/core": "^3.11.2",
"@uppy/google-drive": "^3.2.0",
"@uppy/locales": "^3.2.4",
"@uppy/onedrive": "^3.3.1",
"@uppy/react": "^3.1.3",
"@uppy/tus": "^3.5.4",

Expected behavior

It shouldn't throw error, as it works fine with yarn

Actual behavior

Cannot build project

@Murderlon
Copy link
Member

Hi, do you mean pnpm install @uppy/core?

@bhavesh2510
Copy link
Author

@Murderlon yes correct, basically a file called UploaderPlugin.js and UploderPlugin.js.map is missing from node modules

@Murderlon
Copy link
Member

Are you sure you are on the latest versions? UploaderPlugin is something that was removed a very long time ago.

@Murderlon
Copy link
Member

Murderlon commented May 13, 2024

Here is what I see locally:

λ pnpm i @uppy/core 
Packages: +10
++++++++++
Progress: resolved 10, reused 0, downloaded 10, added 10, done

dependencies:
+ @uppy/core 3.11.2

Done in 3.9s

@bhavesh2510
Copy link
Author

@Murderlon compare this with yarn

Yarn dependencies :
https://github.com/transloadit/uppy/assets/88138643/13a4de95-cdcf-484d-ba31-887b4868bc86

Pnpm dependencies :
In pnpm above two files will be missing

@Murderlon
Copy link
Member

Murderlon commented May 13, 2024

UploaderPlugin is not supposed to be there, it's has been removed more than a year ago, which means you are somehow using old versions with yarn. Without a way to reproduce this, I'm not sure what further help I can provide.

@bhavesh2510
Copy link
Author

bhavesh2510 commented May 13, 2024

@Murderlon here are steps to reproduce

  1. pnpm install @uppy/core`
  2. check node_modules inside .pnpm
  3. find @uppy/core and there you will see files are not present
    Because of this project won't build

This doesn't happens with yarn, if plugin was removed not sure why it still comes with yarn
Here are uppy dependecies which i'm using
"@uppy/aws-s3": "^3.6.2",
"@uppy/core": "^3.11.2",
"@uppy/google-drive": "^3.2.0",
"@uppy/locales": "^3.2.4",
"@uppy/onedrive": "^3.3.1",
"@uppy/react": "^3.1.3",
"@uppy/tus": "^3.5.4",

@Murderlon
Copy link
Member

Your output clearly says xhr-upload@3.3.1. Upgrade to the latest versions and you won't see this error anymore.

@bhavesh2510
Copy link
Author

I have tried that as well, it didn't worked, basically xhr-upload, and some other dependencies is trying to find missing file from uppy core
temporarily i have done patch fix and added missing files
Will it break in future?

@Murderlon
Copy link
Member

Are you 100% sure that all your Uppy packages are on the latest version? Maybe you're lockfile is outdated. One of the plugins is referencing code that was published over a year ago, you have a big version mismatch somewhere. I wouldn't recommend patching this but upgrading.

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

No branches or pull requests

2 participants