为了账号安全,请及时绑定邮箱和手机立即绑定

服务访问不了

run run dev成功,但是又warning,访问http://0.0.0.0:8000访问不了

> deployplatform@1.0.0 dev D:\deploy_platform\DeployPlatform
> cross-env NODE_ENV=development webpack-dev-server --config webpack.config.jsi 「wds」: Project is running at http://localhost:8080/
i 「wds」: webpack output is served from /
‼ 「wdm」: Hash: 4c5862c10d39e50f4690
Version: webpack 4.16.4
Time: 21047ms
Built at: 2018-08-07 19:09:48
     Asset       Size  Chunks                    Chunk Names
    bg.png   2.32 KiB          [emitted]
 bundle.js   2.07 MiB       0  [emitted]  [big]  main
index.html  182 bytes          [emitted]
Entrypoint main [big] = bundle.js
  [91] ./node_modules/url/url.js 22.8 KiB {0} [built]
 [203] ./src/assets/images/bg.png 52 bytes {0} [built]
 [416] ./node_modules/vue/dist/vue.runtime.esm.js 207 KiB {0} [built]
 [417] multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js 40 bytes {0} [built]
 [418] (webpack)-dev-server/client?http://localhost:8080 7.78 KiB {0} [built]
 [422] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
 [424] ./node_modules/loglevel/lib/loglevel.js 7.68 KiB {0} [built]
 [425] (webpack)-dev-server/client/socket.js 1.05 KiB {0} [built]
 [427] (webpack)-dev-server/client/overlay.js 3.58 KiB {0} [built]
 [432] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {0} [built]
 [434] (webpack)/hot/emitter.js 77 bytes {0} [built]
 [439] ./src/assets/styles/index.css 1.07 KiB {0} [built]
 [442] ./src/assets/styles/test-stylus.styl 1.22 KiB {0} [built]
 [444] (webpack)/lib/webpack.js 7.36 KiB {0} [built]
[1059] ./src/index.js + 6 modules 4.84 KiB {0} [built]
       | ./src/index.js 335 bytes [built]
       | ./src/App.vue 1.09 KiB [built]
       | ./src/App.vue?vue&type=template&id=7ba5bd90& 195 bytes [built]
       | ./src/App.vue?vue&type=script&lang=js& 248 bytes [built]
       | ./node_modules/vue-loader/lib/runtime/componentNormalizer.js 2.63 KiB [built]
       | ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=template&id=7ba5bd90& 240 bytes [built]
       | ./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js& 107 bytes [built]
    + 1045 hidden modules

WARNING in ./node_modules/loader-runner/lib/loadLoader.js 3:2-28
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/loader-runner/lib/LoaderRunner.js
 @ (webpack)/lib/NormalModule.js
 @ (webpack)/lib/AutomaticPrefetchPlugin.js
 @ (webpack)/lib/webpack.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js

WARNING in ./node_modules/uglify-es/tools/node.js 18:11-32
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/uglifyjs-webpack-plugin/dist/uglify/minify.js
 @ ./node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js
 @ ./node_modules/uglifyjs-webpack-plugin/dist/index.js
 @ ./node_modules/uglifyjs-webpack-plugin/dist/cjs.js
 @ (webpack)/lib/WebpackOptionsDefaulter.js
 @ (webpack)/lib/webpack.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js

WARNING in ./node_modules/worker-farm/lib/child/index.js 49:33-53
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/worker-farm/lib/fork.js
 @ ./node_modules/worker-farm/lib/farm.js
 @ ./node_modules/worker-farm/lib/index.js
 @ ./node_modules/uglifyjs-webpack-plugin/dist/uglify/index.js
 @ ./node_modules/uglifyjs-webpack-plugin/dist/index.js
 @ ./node_modules/uglifyjs-webpack-plugin/dist/cjs.js
 @ (webpack)/lib/WebpackOptionsDefaulter.js
 @ (webpack)/lib/webpack.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js

WARNING in ./node_modules/chokidar/lib/fsevents-handler.js
Module not found: Error: Can't resolve 'fsevents' in 'D:\deploy_platform\DeployPlatform\node_modules\chokidar\lib'
 @ ./node_modules/chokidar/lib/fsevents-handler.js
 @ ./node_modules/chokidar/index.js
 @ ./node_modules/watchpack/lib/DirectoryWatcher.js
 @ ./node_modules/watchpack/lib/watcherManager.js
 @ ./node_modules/watchpack/lib/watchpack.js
 @ (webpack)/lib/node/NodeWatchFileSystem.js
 @ (webpack)/lib/node/NodeEnvironmentPlugin.js
 @ (webpack)/lib/webpack.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js

WARNING in (webpack)/lib/debug/ProfilingPlugin.js
Module not found: Error: Can't resolve 'inspector' in 'D:\deploy_platform\DeployPlatform\node_modules\webpack\lib\debug'
 @ (webpack)/lib/debug/ProfilingPlugin.js
 @ (webpack)/lib/webpack.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js

WARNING in ./node_modules/loader-runner/lib/loadLoader.js 3:2-28
System.import() is deprecated and will be removed soon. Use import() instead.
For more info visit https://webpack.js.org/guides/code-splitting/
 @ ./node_modules/loader-runner/lib/LoaderRunner.js 7:17-40
 @ (webpack)/lib/NormalModule.js
 @ (webpack)/lib/AutomaticPrefetchPlugin.js
 @ (webpack)/lib/webpack.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  bundle.js (2.07 MiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (2.07 MiB)
      bundle.js


WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [0] ./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/html-webpack-plugin/default_index.ejs 376 bytes {0} [built]
    [1] ./node_modules/lodash/lodash.js 527 KiB {0} [built]
    [2] (webpack)/buildin/global.js 509 bytes {0} [built]
    [3] (webpack)/buildin/module.js 519 bytes {0} [built]
i 「wdm」: Compiled with warnings.

正在回答

2 回答

视频里的webpack版本是3.10.0

0 回复 有任何疑惑可以回复我~

应该是你配置的问题,缺少依赖,还有webpack.config.js里的port,limit配置对了吗?再看看webpack的版本,你如果安装的是webpack4.0可能某些配置项需要改变。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

服务访问不了

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信