ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.7k stars 244 forks source link

Trouble importing axios #544

Closed danmandel closed 6 years ago

danmandel commented 6 years ago

Hey, this is my first time attempting server-side rendering with React so I am most likely missing some important step in the process. When I try to import axios in a component inside the shared folder, and it gives me the following error:

ERROR in ./node_modules/axios/lib/defaults.js
Module not found: Error: Can't resolve './../../node-libs-browser/node_modules/process/browser.js' in '/Users/Dan/Desktop/programming/serverside2/node_modules/axios/lib'
 @ ./node_modules/axios/lib/defaults.js 1:0-68
 @ ./node_modules/axios/lib/axios.js
 @ ./node_modules/axios/index.js
 @ ./shared/components/modules/Contact/Contact.jsx
 @ ./shared/components/modules/Contact/index.js
 @ ./shared/components/DemoApp/index.js
 @ ./client/index.js
 @ multi regenerator-runtime/runtime react-hot-loader/patch webpack-hot-middleware/client?reload=true&path=http://0.0.0.0:7331/__webpack_hmr ./client/index.js 

Any help would be greatly appreciated. Edit: I am getting this error with multiple modules, so it appears that I am missing some step in the module installation process other than "npm install --save axios"