question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install scaffolder-backend-module-http-request in Backstage

See original GitHub issue

Expected Behavior

Running yarn install should succeed.

Current Behavior

I see this error: error An unexpected error occurred: "expected workspace package to exist for \"@types/webpack\"".

**cd packages/backend**
**yarn add @roadiehq/scaffolder-backend-module-http-request**
yarn add v1.22.1
[1/4] 🔍  Resolving packages...
warning Lockfile has incorrect entry for "ws@7.4.5". Ignoring it.
[2/4] 🚚  Fetching packages...
info esbuild-android-arm64@0.14.10: The platform "darwin" is incompatible with this module.
# [...]
**error An unexpected error occurred: "expected workspace package to exist for \"@types/webpack\"".**
info If you think this is a bug, please open a bug report with the information provided in yarn-error.log

Manually editing the packages/backend/package.json to add @roadiehq/scaffolder-backend-module-http-request and running yarn install works successfully.

Steps to Reproduce

See above.

Possible Solution

Possibly related to https://github.com/yarnpkg/yarn/issues/7807?

Your Environment

I’m on an M1 Mac Air

yarn --version
1.22.1

node --version
v16.4.0

My backend package is:

{
  "name": "example-backend",
  "version": "0.2.59",
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dtuitecommented, Jan 3, 2022

Once again, manually adding the package works ok.

diff --git a/packages/backend/package.json b/packages/backend/package.json
index f20465978..3dd5e2a98 100644
--- a/packages/backend/package.json
+++ b/packages/backend/package.json
@@ -58,6 +58,7 @@
     "@backstage/plugin-todo-backend": "^0.1.17",
     "@gitbeaker/node": "^34.6.0",
     "@octokit/rest": "^18.5.3",
+    "@roadiehq/scaffolder-backend-module-http-request": "2.1.2",
     "azure-devops-node-api": "^11.0.1",
     "dockerode": "^3.3.1",
     "example-app": "^0.2.58",
cd ../..
yarn install
✨  Done in 146.57s
1reaction
dtuitecommented, Jan 3, 2022

@Xantier I am still experiencing this problem. Here’s my reproduction steps:

git clone git@github.com:RoadieHQ/backstage.git
cd backstage
yarn && yarn clean && yarn tsc && yarn build
cd packages/backend
yarn add @roadiehq/scaffolder-backend-module-http-request@latest
error An unexpected error occurred: "expected workspace package to exist for \"@types/webpack\"".
Read more comments on GitHub >

github_iconTop Results From Across the Web

@roadiehq/scaffolder-backend-module-http-request - npm
Welcome to the http actions for the scaffolder-backend . This contains one action: http:backstage:request . The http:backstage:request action ...
Read more >
[plugin-scaffolder-backend] breaks on try generate in a new ...
When a new project is created using the @backstage/create-app , the scaffolder functionality isn't working.
Read more >
Installing @backstage/plugin-scaffolder
You'll need to add the plugin to the backend 's router. You can do this by creating a file called packages/backend/src/plugins/scaffolder.ts with the...
Read more >
backstage/plugin-scaffolder-backend v1.6.0 - npm.io
To check if you already have the package, look under packages/backend/package.json , in the dependencies block, for @backstage/plugin-scaffolder-backend . The ...
Read more >
Spotify Plugins for Backstage
Spotify Plugins for Backstage is a bundle subscription — made with love at Spotify — for Backstage adopters to accelerate their developer experience...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found