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

[BUG] TypeScript Hello World example fails to build #1724

Closed
1 of 9 tasks
LostInBrittany opened this issue Mar 20, 2024 · 1 comment
Closed
1 of 9 tasks

[BUG] TypeScript Hello World example fails to build #1724

LostInBrittany opened this issue Mar 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@LostInBrittany
Copy link
Contributor

Affected project(s)

  • documentation
  • examples
  • wasmCloud host
  • wasmCloud CLI (wash)
  • wasmCloud dashboard UI (washboard)
  • capability providers
  • provider bindgen
  • control interface client
  • other / not sure

Describe the bug

The TypeScript Hello World example fails to build while following the doc, the wash build command fails with an error:

$ wash build

failed to build actor with custom command: "Error: The package \"@bytecodealliance/wizer-linux-x64\" could not be found, and is needed by @bytecodealliance/wizer.\nIf you are installing @bytecodealliance/wizer with npm, make sure that you don't specify the\n\"--no-optional\" flag. The \"optionalDependencies\" package.json feature is used\nby @bytecodealliance/wizer to install the correct binary executable for your current platform.\n    at file:///home/horacio/git/wasmcloud/hello/node_modules/@bytecodealliance/wizer/index.js:11:9\n"

Steps to reproduce

  1. Create the project
    wash new component hello --template-name hello-world-typescript
  2. Execute npm install
  3. Try to build with wash build

Expected behavior

The project building without problem

Environment

  • OS: Linux Fedora 39
  • Shell: bash
  • wasmcloud version: wash 0.27.0-alpha.1

Screenshots / Logs / Additional context

No response

@LostInBrittany LostInBrittany added the bug Something isn't working label Mar 20, 2024
@LostInBrittany
Copy link
Contributor Author

I think the problem lies in the packages-lock.json, as in this file the package @bytecodealliance/wizer doesn;'t bring all its dependances for the different OS, but only @bytecodealliance/wizer-darwin-arm64.

    "node_modules/@bytecodealliance/wizer": {
      "version": "3.0.1",
      "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer/-/wizer-3.0.1.tgz",
      "integrity": "sha512-f0NBiBHCNBkbFHTPRbA7aKf/t4KyNhi2KvSqw3QzCgi8wFF/uLZ0dhejj93rbiKO/iwWbmU7v9K3SVkW81mcjQ==",
      "dev": true,
      "bin": {
        "wizer": "wizer.js"
      },
      "engines": {
        "node": ">=16"
      },
      "optionalDependencies": {
        "@bytecodealliance/wizer-darwin-arm64": "3.0.1",
        "@bytecodealliance/wizer-darwin-x64": "3.0.1",
        "@bytecodealliance/wizer-linux-arm64": "3.0.1",
        "@bytecodealliance/wizer-linux-s390x": "3.0.1",
        "@bytecodealliance/wizer-linux-x64": "3.0.1",
        "@bytecodealliance/wizer-win32-x64": "3.0.1"
      }
    },
    "node_modules/@bytecodealliance/wizer-darwin-arm64": {
      "version": "3.0.1",
      "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer-darwin-arm64/-/wizer-darwin-arm64-3.0.1.tgz",
      "integrity": "sha512-/8KYSajyhO9koAE3qQhYfC6belZheJw9X3XqW7hrizTpj6n4z4OJFhhqwJmiYFUUsPtC7OxcXMFFPbTuSQPBcw==",
      "cpu": [
        "arm64"
      ],
      "dev": true,
      "optional": true,
      "os": [
        "darwin"
      ],
      "bin": {
        "wizer-darwin-arm64": "wizer"
      }
    },

Removing package-lock.json and rebuilding solves the problem.

LostInBrittany added a commit to LostInBrittany/wasmCloud that referenced this issue Mar 20, 2024
LostInBrittany added a commit to LostInBrittany/wasmCloud that referenced this issue Mar 20, 2024
Signed-off-by: Horacio Gonzalez <horacio.gonzalez@gmail.com>
LostInBrittany added a commit to LostInBrittany/wasmCloud that referenced this issue Mar 21, 2024
Signed-off-by: Horacio Gonzalez <horacio.gonzalez@gmail.com>
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

1 participant