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

Web examples instructions incomplete #585

Open
emilk opened this issue Mar 8, 2022 · 1 comment
Open

Web examples instructions incomplete #585

emilk opened this issue Mar 8, 2022 · 1 comment

Comments

@emilk
Copy link

emilk commented Mar 8, 2022

Heading over to https://github.com/phaazon/luminance-rs/tree/master/examples/web I follow the instructions and run yarn install and then yarn serve and get this:

❯ yarn serve
yarn run v1.22.17
$ webpack-dev-server
🧐  Checking for wasm-pack...

✅  wasm-pack is installed. 

ℹ️  Compiling your crate in development mode...

ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from .
error: Found argument '--out-name' which wasn't expected, or isn't valid in this context
        Did you mean --out-dir?

USAGE:
    wasm-pack build --out-dir <out_dir>

For more information try --help
ℹ 「wdm」: Hash: 38f42acc8f8bcd7e0c69
Version: webpack 4.46.0
Time: 252ms
Built at: 03/08/2022 10:21:10 AM
     Asset       Size  Chunks             Chunk Names
0.index.js  312 bytes       0  [emitted]  
index.html  181 bytes          [emitted]  
  index.js    340 KiB    main  [emitted]  main
Entrypoint main = index.js
[0] multi (webpack)-dev-server/client?http://localhost:8080 ./index.js 40 bytes {main} [built]
[./index.js] 4.57 KiB {main} [built]
[./node_modules/ansi-html-community/index.js] 4.16 KiB {main} [built]
[./node_modules/html-entities/lib/index.js] 449 bytes {main} [built]
[./node_modules/loglevel/lib/loglevel.js] 9.34 KiB {main} [built]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 4.29 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.52 KiB {main} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {main} [built]
[./node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {main} [built]
[./node_modules/webpack-dev-server/node_modules/strip-ansi/index.js] (webpack)-dev-server/node_modules/strip-ansi/index.js 161 bytes {main} [built]
[./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
[./pkg/index.js] 0 bytes {0} [built]
    + 20 hidden modules
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/html-webpack-plugin/default_index.ejs] 376 bytes {0} [built]
    [./node_modules/lodash/lodash.js] 531 KiB {0} [built]
    [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
✖ 「wdm」: Hash: a64ab0aee52915454060
Version: webpack 4.46.0
Time: 19ms
Built at: 03/08/2022 10:21:10 AM
     Asset       Size  Chunks             Chunk Names
index.html  181 bytes          [emitted]  
 + 2 hidden assets
Entrypoint main = index.js
[./pkg/index.js] 0 bytes {0} [built]
    + 34 hidden modules

ERROR in Rust compilation.
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
       4 modules
ℹ 「wdm」: Failed to compile.
ℹ 「wdm」: Compiling...
✖ 「wdm」: Hash: e0269b42ad5e23f5366e
Version: webpack 4.46.0
Time: 18ms
Built at: 03/08/2022 10:21:10 AM
     Asset       Size  Chunks             Chunk Names
index.html  181 bytes          [emitted]  
 + 2 hidden assets
Entrypoint main = index.js
[./pkg/index.js] 0 bytes {0} [built]
    + 34 hidden modules

ERROR in Rust compilation.
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
       4 modules
ℹ 「wdm」: Failed to compile.
ℹ 「wdm」: Compiling...
✖ 「wdm」: Hash: a64ab0aee52915454060
Version: webpack 4.46.0
Time: 15ms
Built at: 03/08/2022 10:21:11 AM
     Asset       Size  Chunks             Chunk Names
index.html  181 bytes          [emitted]  
 + 2 hidden assets
Entrypoint main = index.js
[./pkg/index.js] 0 bytes {0} [built]
    + 34 hidden modules

ERROR in Rust compilation.
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
       4 modules
ℹ 「wdm」: Failed to compile.
ℹ 「wdm」: Compiling...
✖ 「wdm」: Hash: e0269b42ad5e23f5366e
Version: webpack 4.46.0
Time: 19ms
Built at: 03/08/2022 10:21:11 AM
     Asset       Size  Chunks             Chunk Names
index.html  181 bytes          [emitted]  
 + 2 hidden assets
Entrypoint main = index.js
[./pkg/index.js] 0 bytes {0} [built]
    + 34 hidden modules

ERROR in Rust compilation.
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
       4 modules
ℹ 「wdm」: Failed to compile.

I know nothing about yarn, but could it be index.html is missing?

@wg-romank
Copy link

@emilk could be wasm-pack version?

I just tried on master acb9e23 with

wasm-pack 0.10.2

And yarn serve produces following output

~/Projects/luminance-rs/examples/web$ yarn serve
yarn run v1.22.18
$ webpack-dev-server
🧐  Checking for wasm-pack...

✅  wasm-pack is installed. 

ℹ️  Compiling your crate in development mode...

ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from .
ℹ 「wdm」: wait until bundle finished: /
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
   Compiling proc-macro2 v1.0.37
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.91
   Compiling log v0.4.16
...

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

2 participants