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

failed to read target/wasm32-unknown-unknown/release/project.wasm #414

Closed
huangjj27 opened this issue Oct 15, 2018 · 5 comments
Closed

failed to read target/wasm32-unknown-unknown/release/project.wasm #414

huangjj27 opened this issue Oct 15, 2018 · 5 comments
Labels
bug Something isn't working to-do stuff that needs to happen, so plz do it k thx user report

Comments

@huangjj27
Copy link
Member

huangjj27 commented Oct 15, 2018

🐛 Bug description

when I try to fix #390, I found something strange as described in rustwasm/wasm-bindgen#962, so I just use this project, just changing CARGO_TARGET_DIR and reproduce the issue again.

🤔 Expected Behavior

even if CARGO_TARGET_DIR is overwritten, wasm-pack and wasm-bindgen should also find the target artifacts

👟 Steps to reproduce

  1. open my powershell on windows, working directory at path\to\project\wasm-pack-learn
  2. set variable: $env:CARGO_TARGET_DIR="path\to\project\wasm-pack-learn\wasm-pack-target"
  3. run wasm-pack build

then, it runs into the issues as rustwasm/wasm-bindgen#962:

error: failed to read `target/wasm32-unknown-unknown/release/js_hello_world.wasm`
	caused by: 系统找不到指定的路径。 (os error 3)      # system can't find the path
  1. set variable: $env:CARGO_TARGET_DIR="path\to\project\wasm-pack-learn\wasm-pack-learn\inner-target", run wasm-pack build again. it reproduce the issue.

  2. cargo clean

  3. build with cargo build --target=wasm32-unknown-unknown, it pass

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: wasm-pack 0.5.0
rustc version: rustc 1.31.0-nightly (2c2e2c57d 2018-10-12)

@ashleygwilliams ashleygwilliams added bug Something isn't working to-do stuff that needs to happen, so plz do it k thx user report labels Oct 15, 2018
huangjj27 added a commit to huangjj27/wasm-pack that referenced this issue Oct 16, 2018
this commit fixes rustwasm#390, rustwasm#414, and closes rustwasm#408 for the test case
have to pass after a successful build.
huangjj27 added a commit to huangjj27/wasm-pack that referenced this issue Oct 17, 2018
the old code are hard coded path with "/", which may cause error
on windows, thus changing to use PathBuf.join.

fixing rustwasm#414
huangjj27 added a commit to huangjj27/wasm-pack that referenced this issue Oct 20, 2018
this commit fixes rustwasm#390, rustwasm#414, and closes rustwasm#408 for the test case
have to pass after a successful build.
xmclark added a commit to xmclark/wasm-pack that referenced this issue Oct 29, 2018
Change to INFO when alerting users about missing fields in Cargo.toml

Combine filed missing messages into one INFO line

Fix bad formating

Merge pull request rustwasm#394 from mstallmo/master

Change to INFO when alerting users about missing fields Cargo.toml
child: Always print everything to our output

Also don't buffer the child's stdout and stderr.

error: Add stdout to the `Error::Cli` variant

refactor: Return failure::Error instead of wasm_pack::error::Error

refactor: Import self and use full module path for failure

Use full module path for failure to be consistent since
it's used like that in other modules.

refactor: Return failure::Error instead of wasm_pack::error::Error

chore: Run rustfmt

chore: Run rustfmt

Merge pull request rustwasm#392 from fitzgen/child-process-and-output-management

Child process and output management
Merge pull request rustwasm#401 from drager/return-failure-error

Return `Result<T, failure::Error>` instead of `Result<T, wasm_pack::error::Error>`
v0.5.1

Merge pull request rustwasm#404 from rustwasm/0.5.1

v0.5.1
feat(website): bump vers

Merge pull request rustwasm#405 from rustwasm/website-update

feat(website): bump vers
test(command/build): add a test for build command

useing local wasm-bindgen

Fix typo in test function name for copying the README

bugfix(bindgen-target-dir): use PathBuf to join

the old code are hard coded path with "/", which may cause error
on windows, thus changing to use PathBuf.join.

fixing rustwasm#414

change for cargo_metadata

Merge branch 'master' into test-build-for-example
Merge pull request rustwasm#408 from huangjj27/test-build-for-example

test(command/build): add a test for build command
Merge pull request rustwasm#412 from mstallmo/typo-fix

Fix typo in test function name for copying the README
Merge branch 'master' into fix-canonical-paths-on-windows
this change is not related to this PR


use absolutize


remove unused use


cargo fmt
huangjj27 added a commit to huangjj27/wasm-pack that referenced this issue Oct 30, 2018
this commit fixes rustwasm#390, rustwasm#414, and closes rustwasm#408 for the test case
have to pass after a successful build.
huangjj27 added a commit to huangjj27/wasm-pack that referenced this issue Nov 8, 2018
this commit fixes rustwasm#390, rustwasm#414, and closes rustwasm#408 for the test case
have to pass after a successful build.
huangjj27 added a commit to huangjj27/wasm-pack that referenced this issue Nov 17, 2018
this commit fixes rustwasm#390, rustwasm#414, and closes rustwasm#408 for the test case
have to pass after a successful build.
@RReverser
Copy link
Member

RReverser commented Nov 30, 2018

@huangjj27 Why did you close this issue? I just ran into the same, and it doesn't seem to be fixed (except in your commits in a fork).

@ashleygwilliams Could this be reopened please?

@huangjj27
Copy link
Member Author

huangjj27 commented Nov 30, 2018

@RReverser closed because the fix has been merged to master, but the fix locates after v0.5.1, thus you may get into this bug.

@huangjj27 huangjj27 reopened this Nov 30, 2018
@RReverser
Copy link
Member

Thanks!

@RReverser
Copy link
Member

Ahh, so just like with workspace issue, need to wait for a new release.

@crackcomm
Copy link

I installed from the master and indeed the issue is fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to-do stuff that needs to happen, so plz do it k thx user report
Projects
None yet
Development

No branches or pull requests

4 participants