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

build(yarn): Can't add new package - "expected workspace package to exist for \"webpack-cli\"" #1935

Closed
outSH opened this issue Mar 18, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@outSH
Copy link
Contributor

outSH commented Mar 18, 2022

Describe the bug

Using yarn add <package> on main:HEAD ends with an error. Also, some ugly warnings are printed (warning Lockfile has incorrect entry for ...).

To Reproduce

yarn add <package> in any cactus package (checked on more than one).

Expected behavior

Package should install, no warnings.

Logs/Stack traces

outsh@outsh-UbuntuCactusVM:/tmp/cactus/packages/cactus-plugin-ledger-connector-quorum$ yarn add run-time-error@1.4.0
yarn add v1.22.17
[1/4] Resolving packages...
warning Lockfile has incorrect entry for "lodash@4.17.21". Ignoring it.
warning Lockfile has incorrect entry for "lodash@^4.17.21". Ignoring it.
warning Lockfile has incorrect entry for "lodash@4.17.19". Ignoring it.
warning Lockfile has incorrect entry for "underscore@1.12.1". Ignoring it.
warning Lockfile has incorrect entry for "glob-parent@^6.0.0". Ignoring it.
warning Lockfile has incorrect entry for "ansi-html@0.0.7". Ignoring it.
warning Lockfile has incorrect entry for "underscore@1.9.1". Ignoring it.
warning Lockfile has incorrect entry for "glob-parent@^3.1.0". Ignoring it.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "workspace-aggregator-260e8a8b-ef5d-47c3-b190-826e5364a0d5 > @hyperledger/cactus-example-carbon-accounting-frontend > @ionic-native/core@5.35.0" has incorrect peer dependency "rxjs@^5.5.0 || ^6.5.0".
warning "workspace-aggregator-260e8a8b-ef5d-47c3-b190-826e5364a0d5 > @hyperledger/cactus-example-carbon-accounting-frontend > @ionic-native/splash-screen@5.35.0" has incorrect peer dependency "rxjs@^5.5.0 || ^6.5.0".
warning "workspace-aggregator-260e8a8b-ef5d-47c3-b190-826e5364a0d5 > @hyperledger/cactus-example-carbon-accounting-frontend > @ionic-native/status-bar@5.35.0" has incorrect peer dependency "rxjs@^5.5.0 || ^6.5.0".
warning "workspace-aggregator-260e8a8b-ef5d-47c3-b190-826e5364a0d5 > @hyperledger/cactus-example-carbon-accounting-frontend > @ionic/angular-toolkit@4.0.0" has unmet peer dependency "@angular-devkit/architect@^0.1200.0".
warning "workspace-aggregator-260e8a8b-ef5d-47c3-b190-826e5364a0d5 > @hyperledger/cactus-example-carbon-accounting-frontend > @ionic/angular-toolkit@4.0.0" has unmet peer dependency "@angular-devkit/schematics@^12.0.0".
error An unexpected error occurred: "expected workspace package to exist for \"webpack-cli\"".
info If you think this is a bug, please open a bug report with the information provided in "/tmp/cactus/packages/cactus-plugin-ledger-connector-quorum/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Operating system name, version, build:

Linux 5.13.0-35-generic x86_64
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
@outSH outSH added the bug Something isn't working label Mar 18, 2022
@outSH
Copy link
Contributor Author

outSH commented Nov 25, 2022

@petermetz Any insights regarding this one? I think it started to occur just after releasing of V1 (864449f) - possibly caused by several version bumps that happened before it. Do you have any idea what may cause this problem? (it still occurs on other colleagues machines as well)

@petermetz
Copy link
Contributor

@petermetz Any insights regarding this one? I think it started to occur just after releasing of V1 (864449f) - possibly caused by several version bumps that happened before it. Do you have any idea what may cause this problem? (it still occurs on other colleagues machines as well)

@outSH I'm not sure either unfortunately what the root cause is (apart from yarn v1 being buggy and EOL). The long term solution is being worked on in the form of a Yarn v3 migration that is in progress as we speak. The short term one is to add the packages to the package.json file of your package manually and then running yarn install.

@petermetz
Copy link
Contributor

@outSH Now I'm sure that it was the buggy EoL Yarn v1 causing the issue because the upgrade to v3 fixed it (I can no longer reproduce it on the main branch).

#1142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants