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

Cannot find package 'array-union' imported from globby #669

Closed
noahehall opened this issue Feb 16, 2022 · 4 comments
Closed

Cannot find package 'array-union' imported from globby #669

noahehall opened this issue Feb 16, 2022 · 4 comments

Comments

@noahehall
Copy link

noahehall commented Feb 16, 2022

Bug report

cannot use copy-webpack-plugin in webpack 5.68
complains about array-union dependency, imported from globby dependency

imported from: /[some-path]/nodeproto/node_modules/.pnpm/copy-webpack-plugin@10.2.4_webpack@5.68.0/node_modules/globby/index.js

globby removed array union 29 days ago

Actual Behavior

webpack build fails when using copy-webpack-plugin

Expected Behavior

webpack build doesnt fail when using copy-webpack-plugin

I think we just need to upgrade globby from ^12.2 to ^13

How Do We Reproduce?

you can try to issue pnpm build in this repositories subpackage

however, the aforementioned repo requires pnpm 6.30.1 + node 17.5, so you may not be able to install it without me first refactoring my vagrant file

Please paste the results of npx webpack-cli info here, and mention other relevant information

  System:
    OS: Linux 5.13 Ubuntu 21.10 21.10 (Impish Indri)
    CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
    Memory: 16.55 GB / 30.99 GB
  Binaries:
    Node: 17.5.0 - /usr/local/bin/node
    npm: 8.4.1 - /usr/local/bin/npm
  Packages:
    babel-loader: 8.2.3 => 8.2.3 
    bundle-stats-webpack-plugin: 3.2.4 => 3.2.4 
    copy-webpack-plugin: 10.2.4 => 10.2.4 
    css-loader: 6.6.0 => 6.6.0 
    esbuild-loader: 2.18.0 => 2.18.0 
    html-webpack-plugin: 5.5.0 => 5.5.0 
    string-replace-loader: 3.1.0 => 3.1.0 
    style-loader: 3.3.1 => 3.3.1 
    webpack: 5.68.0 => 5.68.0 
    webpack-dev-middleware-2: 5.0.2 => 5.0.2 
    webpack-hot-middleware-2: 2.25.2 => 2.25.2 
@noahehall
Copy link
Author

noahehall commented Feb 16, 2022

well that didnt go as expected, I upgraded globby to 13.1 and now copy-webpack-plugin throws

error: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'merge2' imported from /[somepath]/nodeproto/node_modules/.pnpm/github.com+noahehall+copy-webpack-plugin@cd566dc5f1c7b96b9bd8d762ca5b417ad5c01a5b_webpack@5.68.0/node_modules/globby/index.js

when I cloned copy-webpack to my system, all the tests ran.
the issue may have to do with my pnpm virtual store

@noahehall noahehall changed the title Cannot find package 'array-union' imported from /[some-path]/nodeproto/node_modules/.pnpm/copy-webpack-plugin@10.2.4_webpack@5.68.0/node_modules/globby/index.js Cannot find package 'array-union' imported from globby Feb 16, 2022
@alexander-akait
Copy link
Member

alexander-akait commented Feb 16, 2022

Please open an issue in pnpm, we don't use something special, just async import to load ESM version of globby, so we can't fix it here

@alexander-akait
Copy link
Member

https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/src/index.js#L802

@noahehall
Copy link
Author

dude I owe you a cup of coffee

setting node-linker to hoisted friggin solved it,

I need to think through the architecture now..

thx again!

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

No branches or pull requests

2 participants