# where i run npm run dev, shows "Uncaught Error: Cannot find module 'axios'" in console, and the main window shows nothing.
Uncaught Error: Cannot find module 'axios'
at Module._resolveFilename (module.js:543)
at Function.Module._resolveFilename (/Volumes/Sites/PDD/pddmigrateclient/pddmigrateclient/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35)
at Function.Module._load (module.js:473)
at Module.require (module.js:586)
at require (internal/module.js:11)
at eval (webpack-internal:///axios:1)
at Object.axios (renderer.js:1576)
at __webpack_require__ (renderer.js:728)
at fn (renderer.js:102)
at eval (webpack-internal:///./src/renderer/main.js:3)
#
you are not install axios you can npm install axios -S just try
i meet this problem too! ,I've tried npm install axios -S ,but it not work.
i meet this problem too.
I find a proble for windows.
when I tried npm install axios -g, it needed a dependency [email protected].
I try to install, get this error:
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
it maybe not fit for windows.
so I try to not use axios, when creat a new project.
$ yarn add axios
$ npm install axios --save
I've tried npm install and yarn add,all not work.
I've tried npm install and yarn add,all not work.
me too
Has anyone solved it?
If you have change webpack config,look#871
Don't change webpack config
just: https://github.com/SimulatedGREG/electron-vue/issues/871#issuecomment-564302194
webpack.renderer.config.js
let whiteListedModules = ['vue','axios','vue-electron',
'vue-router',
'vuex',
'vuex-electron','element-ui']
like this......
Ran into this same issue. The whiteListedModules should probably be automatically populated based on the install script options.
webpack.renderer.config.js
let whiteListedModules = ['vue','axios','vue-electron', 'vue-router', 'vuex', 'vuex-electron','element-ui']
like this......
It's works for me, thanks!
webpack.renderer.config.js
let whiteListedModules = ['vue','axios','vue-electron', 'vue-router', 'vuex', 'vuex-electron','element-ui']
like this......
It's works for me, thanks!
Most helpful comment
webpack.renderer.config.js
let whiteListedModules = ['vue','axios','vue-electron', 'vue-router', 'vuex', 'vuex-electron','element-ui']like this......