YuraDev/vue-chrome-extension-template

npm run dev error

zhaokuohaha opened this issue · 8 comments

Hi Yura:
I got a problem when use the template.
I run follow commands

vue init 

the project compile succeed, but it can't run
and got this error message:

 npm run dev

> vue-chrome-extension-template@0.0.1 dev E:\Learning\chrome\bwvue2
> webpack --config ./core/webpack.dev.js --hide-modules


Webpack is watching the files…

[ Starting the Chrome Hot Plugin Reload Server... ]
 DONE  Compiled successfully in 7536ms17:22:01

Hash: 42f3b6d42d4352a3ae7e
Version: webpack 3.10.0
Time: 7536ms
                          Asset       Size  Chunks                    Chunk Names
               ./pages/app.html  355 bytes          [emitted]
fonts/element-icons.6f0a763.ttf      11 kB          [emitted]
                      js/tab.js     869 kB       1  [emitted]  [big]  tab
                  js/options.js     869 kB       2  [emitted]  [big]  options
                    js/panel.js     869 kB       3  [emitted]  [big]  panel
                 js/devtools.js    5.51 kB       4  [emitted]         devtools
                   js/inject.js    5.72 kB       5  [emitted]         inject
                  js/content.js    5.25 kB       6  [emitted]         content
               js/background.js    5.25 kB       7  [emitted]         background
                    js/popup.js    4.88 MB       0  [emitted]  [big]  popup
             ./pages/popup.html  358 bytes          [emitted]
             ./pages/panel.html  358 bytes          [emitted]
          ./pages/devtools.html  364 bytes          [emitted]
           ./pages/options.html  362 bytes          [emitted]
        ./pages/background.html  368 bytes          [emitted]
                   icons/16.png    18.2 kB          [emitted]
                  icons/128.png    21.2 kB          [emitted]
                   icons/48.png    19.4 kB          [emitted]
                  manifest.json  821 bytes          [emitted]
Child html-webpack-plugin for "pages\app.html":
     1 asset
Child html-webpack-plugin for "pages\popup.html":
     1 asset
Child html-webpack-plugin for "pages\panel.html":
     1 asset
Child html-webpack-plugin for "pages\devtools.html":
     1 asset
Child html-webpack-plugin for "pages\options.html":
     1 asset
Child html-webpack-plugin for "pages\background.html":
     1 asset
Chrome: [ WCER: 17:22:01 -  | content successfully reloaded ]
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at _errnoException (util.js:1024:11)
    at TCP.onread (net.js:615:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-chrome-extension-template@0.0.1 dev: `webpack --config ./core/webpack.dev.js --hide-modules`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-chrome-extension-template@0.0.1 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

in the browser, when runing extension , press F12 and got this error message:

tab.js?42f3b6d42d4352a3ae7e:21 WebSocket connection to 'ws://localhost:9090/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
init @ tab.js?42f3b6d42d4352a3ae7e:21
setTimeout @ tab.js?42f3b6d42d4352a3ae7e:40
tab.js?42f3b6d42d4352a3ae7e:14 [ WCER: Socket connection closed. Code 1006. See more in https://tools.ietf.org/html/rfc6455#section-7.4.1 ]

how could I do to resolve this problem ?

The environment:

  • System: Windows 10
  • Chrome : 63.0.3239.108
  • Vue-cli : 2.8.1
  • npm : 5.6.0
  • node: 8.9.2

I install ws@3.3.2 and resolve it : ionic-team/ionic-cli#2922

ws@3.3.2 --save-dev --save-exact

I have this same issue, and what worked for @zhaokuohaha does not appear to work for me.

+1, I have the same error...

@roscopecoltran, what version of Node.js do you have installed? I had 10.x installed and found my problem was fixed when I went back to using 8.11.3 instead.

events.js:183
throw er; // Unhandled 'error' event
^

TypeError: Cannot read property '0' of undefined
at Object.exports.parseConfig (F:\IndiansInCA\node_modules@ionic\app-scripts\dist\util\cordova-config.js:34:26)
at F:\IndiansInCA\node_modules@ionic\app-scripts\dist\util\cordova-config.js:22:24
at Parser. (F:\IndiansInCA\node_modules\xml2js\lib\parser.js:303:18)
at emitOne (events.js:116:13)
at Parser.emit (events.js:211:7)
at SAXParser.onclosetag (F:\IndiansInCA\node_modules\xml2js\lib\parser.js:261:26)
at emit (F:\IndiansInCA\node_modules\sax\lib\sax.js:624:35)
at emitNode (F:\IndiansInCA\node_modules\sax\lib\sax.js:629:5)
at closeTag (F:\IndiansInCA\node_modules\sax\lib\sax.js:889:7)
at SAXParser.write (F:\IndiansInCA\node_modules\sax\lib\sax.js:1436:13)
please help ..

Did anybody got any fix for this problem

yes , check your config.xml file. app name , and check many parameter compare to any other project .