rustwasm / book

The Rust and WebAssembly Book
https://rustwasm.github.io/docs/book/
MIT License
1.75k stars 211 forks source link

silly fetchPackageMetaData error for wasm-game-of-life@file: ../pkg Could not install from " ../pkg" as it does not contain a package.json file #191

Closed magj2006 closed 5 years ago

magj2006 commented 5 years ago

I followed the steps of book, but got this error when I run command 'npm install' in www. and I checked there is a package.json in pkg directory.

屏幕快照 2019-10-04 下午1 38 21
magj2006 commented 5 years ago

it‘ OK now.

Dygear commented 3 years ago

Ok. What did you do? How did you fix this?

Dygear commented 3 years ago

Also, these issues might be linked. https://github.com/rustwasm/wasm-pack/issues/913

If the above fails, the package.json is never created in the pkg directory.

magj2006 commented 3 years ago

Ok. What did you do? How did you fix this?

@Dygear Sorry, see it today. It have been long time, so I forgot it.

lisiur commented 3 years ago

I also encountered the same problem, the reason is that there is an extra space in front of ../pkg. change file: ../pkg to file:../pkg