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.

esbuild dependency breaks "yarn --ignore-optional"

See original GitHub issue

Expected Behavior

A backstage app should build after doing yarn install --frozen-lockfile --ignore-optional

Actual Behavior

@backstage-cli package build
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:

Error: The package "esbuild-darwin-arm64" could not be found, and is needed by esbuild.

If you are installing esbuild with npm, make sure that you don't specify the
"--no-optional" flag. The "optionalDependencies" package.json feature is used
by esbuild to install the correct binary executable for your current platform.

Steps to Reproduce

  1. yarn install --frozen-lockfile --ignore-optional
  2. yarn tsc
  3. yarn build

Context

I’m using --ignore-optional because of a cpu_features module build failure that gets (optionally) pulled in through tht ssh modules.

Your Environment

  • Browser Information: N/A

  • Output of yarn backstage-cli info:

OS:   Darwin 21.4.0 - darwin/arm64
node: v16.14.2
yarn: 1.22.18
cli:  0.17.0 (installed)

Dependencies:
  @backstage/app-defaults                            1.0.1
  @backstage/backend-common                          0.13.2
  @backstage/backend-tasks                           0.3.0
  @backstage/catalog-client                          1.0.1
  @backstage/catalog-model                           1.0.1
  @backstage/cli-common                              0.1.8
  @backstage/cli                                     0.17.0
  @backstage/config-loader                           1.1.0
  @backstage/config                                  1.0.0
  @backstage/core-app-api                            1.0.1
  @backstage/core-components                         0.9.3
  @backstage/core-plugin-api                         1.0.1
  @backstage/dev-utils                               1.0.1
  @backstage/errors                                  1.0.0
  @backstage/integration-react                       1.0.1
  @backstage/integration                             1.1.0
  @backstage/plugin-api-docs                         0.8.4
  @backstage/plugin-app-backend                      0.3.31
  @backstage/plugin-auth-backend                     0.13.0
  @backstage/plugin-auth-node                        0.2.0
  @backstage/plugin-catalog-backend-module-bitbucket 0.1.2
  @backstage/plugin-catalog-backend                  1.1.0
  @backstage/plugin-catalog-common                   1.0.1
  @backstage/plugin-catalog-graph                    0.2.16
  @backstage/plugin-catalog-import                   0.8.7
  @backstage/plugin-catalog-react                    1.0.1
  @backstage/plugin-catalog                          1.1.0
  @backstage/plugin-kafka                            0.3.4
  @backstage/plugin-kubernetes-common                0.2.9
  @backstage/plugin-kubernetes                       0.6.4
  @backstage/plugin-org                              0.5.4
  @backstage/plugin-pagerduty                        0.3.31
  @backstage/plugin-permission-common                0.6.0
  @backstage/plugin-permission-node                  0.6.0
  @backstage/plugin-permission-react                 0.4.0
  @backstage/plugin-proxy-backend                    0.2.25
  @backstage/plugin-scaffolder-backend               1.1.0
  @backstage/plugin-scaffolder-common                1.0.1
  @backstage/plugin-scaffolder                       1.1.0
  @backstage/plugin-search-backend-node              0.6.0
  @backstage/plugin-search-backend                   0.5.0
  @backstage/plugin-search-common                    0.3.3
  @backstage/plugin-search-react                     0.1.0
  @backstage/plugin-search                           0.8.0
  @backstage/plugin-techdocs-backend                 1.1.0
  @backstage/plugin-techdocs-node                    1.1.0
  @backstage/plugin-techdocs-react                   0.1.0
  @backstage/plugin-techdocs                         1.1.0
  @backstage/plugin-user-settings                    0.4.3
  @backstage/release-manifests                       0.0.2
  @backstage/search-common                           0.3.3
  @backstage/test-utils                              1.0.1
  @backstage/theme                                   0.2.15
  @backstage/types                                   1.0.0
  @backstage/version-bridge                          1.0.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
frebencommented, May 9, 2022

Alright, closing then. Let us know if the problem reoccurs.

0reactions
renlordcommented, May 7, 2022

@renlord are you still able to reproduce this?

No, not at the moment. 😕 Seems to be recurrent only before I purged everything and re-installed all the node modules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

esbuild - npm
Start using esbuild in your project by running `npm i esbuild`. There are 2376 other projects in the npm registry using esbuild.
Read more >
Bundling your Node.js app for AWS Lambda - Miroslav Bajtoš
This approach works great for tiny handlers with little or no dependencies. It quickly breaks once you start working with dependencies in a ......
Read more >
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY
It's a warning, not an error. It occurs because fsevents is an optional dependency, used only when project is run on macOS environment...
Read more >
r/javascript - Yarn 3.0 - Performances, ESBuild, Better Patches
I've migrated a project and found that all its dependencies could handle Yarn 2 with nodeLinker: "node-modules" and the only thing blocking me ......
Read more >
Some notes on using esbuild - Hacker News
It works and if something breaks I know how to solve it. ... Rust where I can basically just throw a list of...
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