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

Missing package.json file #965

Open
lencx opened this issue Jan 26, 2021 · 1 comment
Open

Missing package.json file #965

lencx opened this issue Jan 26, 2021 · 1 comment

Comments

@lencx
Copy link

lencx commented Jan 26, 2021

πŸ› Bug description

  1. run wasm-pack build
  2. pkg directory missing package.json file

πŸ€” Expected Behavior

There is a package.json file in the pkg directory

πŸ‘Ÿ Steps to reproduce

example: https://github.com/lencx/learn-wasm

❯ wasm-pack build
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: πŸŒ€  Compiling to Wasm...
    Finished release [optimized] target(s) in 0.01s
⚠️   [WARN]: origin crate has no README
[INFO]: ⬇️  Installing wasm-bindgen...
Error: no prebuilt wasm-opt binaries are available for this platform: Unrecognized target!
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
# wasm-pack build

[pkg]
|- .gitignore
|- chasm_bg.js
|- chasm_bg.wasm
|- chasm_bg.wasm.d.ts
|- chasm.d.ts
|- chasm.js
|- package.json # missing

🌍 Your environment

os: macOS M1(arm)
wasm-pack version: 0.9.1
rustc version: rustc 1.49.0 (e1884a8e3 2020-12-29)

@lencx
Copy link
Author

lencx commented Jan 26, 2021

Solution: disable wasm-opt in Cargo.toml (see: #886 (comment))

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

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

1 participant