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

Code under example folder do not work. #353

Closed
Hacksign opened this issue Apr 12, 2019 · 2 comments · Fixed by folkol/learn-redux#3 · 4 remaining pull requests
Closed

Code under example folder do not work. #353

Hacksign opened this issue Apr 12, 2019 · 2 comments · Fixed by folkol/learn-redux#3 · 4 remaining pull requests

Comments

@Hacksign
Copy link
Contributor

  • Operating System:

Archlinux

  • Node Version:

v11.13.0

  • NPM Version:

6.9.0

  • webpack Version:

"webpack": "^4.0.1" (this is from webpack-hot-middleware/example/package.json)

  • ${package} Version:

"version": "2.24.3" (this is from webpack-hot-middleware/package.json)

Expected Behavior

example is functional as README.md described.

Actual Behavior

There are errors: Moudle not foud ...

ERROR in ../client-overlay.js
Module not found: Error: Can't resolve 'ansi-html' in '/home/hacksign/Code/webpack-hot-middleware'
 @ ../client-overlay.js 24:15-35
 @ ../client.js?path=/__webpack_hmr&timeout=20000&reload=true
 @ multi ./client.js webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true

ERROR in ../client-overlay.js
Module not found: Error: Can't resolve 'html-entities' in '/home/hacksign/Code/webpack-hot-middleware'
 @ ../client-overlay.js 38:15-39
 @ ../client.js?path=/__webpack_hmr&timeout=20000&reload=true
 @ multi ./client.js webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true

ERROR in ../client.js?path=/__webpack_hmr&timeout=20000&reload=true
Module not found: Error: Can't resolve 'strip-ansi' in '/home/hacksign/Code/webpack-hot-middleware'
 @ ../client.js?path=/__webpack_hmr&timeout=20000&reload=true 162:14-35
 @ multi ./client.js webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true

Code

I'm use the code(without any modification) under: webpack-hot-middleware/example/ of this project.

How Do We Reproduce?

well, just do as README.md describe...

hacksign@XSignLaptop [01:28:55] : ~/Code 
>> git clone https://github.com/webpack-contrib/webpack-hot-middleware
正克隆到 'webpack-hot-middleware'...
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 1062 (delta 7), reused 28 (delta 7), pack-reused 1034
接收对象中: 100% (1062/1062), 580.23 KiB | 1.68 MiB/s, 完成.
处理 delta : 100% (573/573), 完成.
hacksign@XSignLaptop [01:29:00] : ~/Code 
>> cd webpack-hot-middleware/example/
hacksign@XSignLaptop [01:29:04] : ~/Code/webpack-hot-middleware/example |master✓
>> npm install
npm WARN webpack-hot-middleware-example@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 427 packages from 342 contributors in 4.829s
hacksign@XSignLaptop [01:29:14] : ~/Code/webpack-hot-middleware/example |master⚡*
>> npm run start:multientry

> webpack-hot-middleware-example@1.0.0 start:multientry /home/hacksign/Code/webpack-hot-middleware/example
> WEBPACK_CONFIG=./webpack.config.multientry.js node server.js

[01:29:18.120] [LOG]    Listening on {"address":"::","family":"IPv6","port":1616}
[01:29:18.363] [LOG]    webpack built cf483b5caf4611b57a5d in 267ms
[01:29:18.389] [ERROR]   「wdm」: Hash: cf483b5caf4611b57a5d
Version: webpack 4.27.1
Time: 267ms
Built at: 2019/04/13 上午1:29:18
        Asset      Size  Chunks  Chunk Names
    client.js  91.9 KiB  client  client
client.js.map   101 KiB  client  client
     extra.js    52 KiB   extra  extra
 extra.js.map  54.9 KiB   extra  extra
Entrypoint client = client.js client.js.map
Entrypoint extra = extra.js extra.js.map
[0] multi ./client.js webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true 40 bytes {client} [built]
[1] multi ./extra.js webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true 40 bytes {extra} [built]
[../client-overlay.js] 2.17 KiB {client} {extra} [built]
[../client.js?path=/__webpack_hmr&timeout=20000&reload=true] 7.68 KiB {client} {extra} [built]
[../process-update.js] 4.35 KiB {client} {extra} [built]
[./client.js] 847 bytes {client} [built]
[./extra.js] 103 bytes {extra} [built]
[./node_modules/assert/assert.js] 15.1 KiB {client} [built]
[./node_modules/inherits/inherits_browser.js] 672 bytes {client} [built]
[./node_modules/querystring-es3/decode.js] 2.45 KiB {client} {extra} [built]
[./node_modules/querystring-es3/encode.js] 2.48 KiB {client} {extra} [built]
[./node_modules/querystring-es3/index.js] 127 bytes {client} {extra} [built]
[./node_modules/util/util.js] 15.2 KiB {client} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {client} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {client} {extra} [built]
    + 2 hidden modules

ERROR in ../client-overlay.js
Module not found: Error: Can't resolve 'ansi-html' in '/home/hacksign/Code/webpack-hot-middleware'
 @ ../client-overlay.js 24:15-35
 @ ../client.js?path=/__webpack_hmr&timeout=20000&reload=true
 @ multi ./client.js webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true

ERROR in ../client-overlay.js
Module not found: Error: Can't resolve 'html-entities' in '/home/hacksign/Code/webpack-hot-middleware'
 @ ../client-overlay.js 38:15-39
 @ ../client.js?path=/__webpack_hmr&timeout=20000&reload=true
 @ multi ./client.js webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true

ERROR in ../client.js?path=/__webpack_hmr&timeout=20000&reload=true
Module not found: Error: Can't resolve 'strip-ansi' in '/home/hacksign/Code/webpack-hot-middleware'
 @ ../client.js?path=/__webpack_hmr&timeout=20000&reload=true 162:14-35
 @ multi ./client.js webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true
@glenjamin
Copy link
Collaborator

I believe you need to npm install in the parent directory first.

@Hacksign
Copy link
Contributor Author

I believe you need to npm install in the parent directory first.

Yeap....you r right, I think this should be mentioned in examples/README.md.
I'm going to add some words to mention this in a new PR....

glenjamin added a commit that referenced this issue Apr 18, 2019
This was referenced Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment