caiobiodere / cordova-template-framework7-vue-webpack

Framework7 - Vue - Webpack Cordova Template with Webpack Dev Server and Hot Module Replacement
Apache License 2.0
620 stars 154 forks source link

Error in -- --live-reloading #56

Closed mayoljonathan closed 7 years ago

mayoljonathan commented 7 years ago

It doesn't work with --live-reloading in my case. I tried android and browser and it fails, same error. It works without the --live-reloading but I need it in development :|

Node version : 7.7.1 Npm version : 4.1.2 Cordova version : 7.0.1

Steps:

cordova create myApp com.new.myApp myApp --template cordova-template-framework7-vue-webpack
cd myApp
cordova platform add browser
cordova run browser -- --live-reload

CLI:

C:\Users\pc\AugmentedMaps>cordova run browser -- --live-reload
Before deploy hook started...
Checking is node modules installed...
Node modules already installed.
Watcher ready!
Project is running at http://192.168.56.1:8081/
webpack output is served from /
Content not from webpack is served from C:\Users\pc\AugmentedMaps\www
Hash: dc3b6bcda4b59e19bad9
Version: webpack 2.7.0
Time: 5363ms

                                        Asset       Size  Chunks                    Chunk Names
i-f7-ios.png?b356cb6518f2679e2645d1224914af9a    7.29 kB          [emitted]
                 dc3b6bcda4b59e19bad9.main.js    2.09 MB       0  [emitted]  [big]  main
                                   index.html  404 bytes          [emitted]
chunk    {0} dc3b6bcda4b59e19bad9.main.js (main) 1.91 MB [entry] [rendered]
 [./node_modules/device.js/lib/device.js] ./~/device.js/lib/device.js 7.64 kB {0} [built]
 [./node_modules/framework7-vue/dist/framework7-vue.min.js] ./~/framework7-vue/dist/framework7-vue.min.js 86.3 kB {0} [built]
 [./node_modules/framework7/dist/js/framework7.js] ./~/framework7/dist/js/framework7.js 823 kB {0} [built]
 [./node_modules/vue/dist/vue.common.js] ./~/vue/dist/vue.common.js 268 kB {0} [built]
 [./node_modules/webpack-dev-server/client/index.js?http:/192.168.56.1:8081] (webpack)-dev-server/client?http://192.168.56.1:8081 5.83 kB {0} [built]
 [./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.6 kB {0} [built]
 [./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 856 bytes {0} [built]
 [./node_modules/webpack/hot ^\.\/log$] (webpack)/hot nonrecursive ^\.\/log$ 160 bytes {0} [built]
 [./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.57 kB {0} [built]
 [./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 77 bytes {0} [built]
 [./node_modules/webpack/hot/log-apply-result.js] (webpack)/hot/log-apply-result.js 1.02 kB {0} [built]
 [./src/main.js] ./src/main.js 1.07 kB {0} [built]
 [./src/routes.js] ./src/routes.js 313 bytes {0} [built]
    [0] multi (webpack)-dev-server/client?http://192.168.56.1:8081 webpack/hot/dev-server ./src/main.js ./webpack/dev_helpers/CordovaDeviceRouter.js 64 bytes {0} [built]
 [./webpack/dev_helpers/CordovaDeviceRouter.js] ./webpack/dev_helpers/CordovaDeviceRouter.js 595 bytes {0} [built]
     + 108 hidden modules

ERROR in (webpack)-dev-server/client?http://192.168.56.1:8081
Module not found: Error: Can't resolve 'loglevel' in 'C:\Users\pc\AugmentedMaps\node_modules\webpack-dev-server\client'
 @ (webpack)-dev-server/client?http://192.168.56.1:8081 4:10-29
 @ multi (webpack)-dev-server/client?http://192.168.56.1:8081 webpack/hot/dev-server ./src/main.js ./webpack/dev_helpers/CordovaDeviceRouter.js
Child html-webpack-plugin for "index.html":
         Asset    Size  Chunks  Chunk Names
    index.html  588 kB       0
    chunk    {0} index.html 542 kB [entry] [rendered]
     [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 887 bytes {0} [built]
     [./node_modules/lodash/lodash.js] ./~/lodash/lodash.js 540 kB {0} [built]
     [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built]
     [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 517 bytes {0} [built]
webpack: Failed to compile.
centrual commented 7 years ago

You are right, checking...

centrual commented 7 years ago

Thank you for your report.

Use this command: npm i loglevel --save

Also i'll update the template soon.

mayoljonathan commented 7 years ago

Thanks ! Got it now working

centrual commented 7 years ago

Dependencies updated. Thank you so much one more time :)