joshgeller / react-redux-jwt-auth-example

Sample project showing possible authentication flow using React, Redux, React-Router, and JWT
MIT License
1.58k stars 237 forks source link

login doesn't work #5

Closed Jan-Jan closed 8 years ago

Jan-Jan commented 8 years ago

Upon attempting to login I get:

"Authentication Error: 404 Not Found"

This is after:

git clone
cd 
npm install 
npm run dev
joshgeller commented 8 years ago

Hi @Jan-Jan, you'll need to run the example server: node server.js

Take a look at the readme for the full instructions.

Jan-Jan commented 8 years ago

According to your package.json "start": "npm run dev", which works appears to work, except for the error I got when logging in.

When I run node server.js i get the following error:

{ [Error: ENOENT: no such file or directory, open '.env'] errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }
module.js:339
    throw err;
    ^

Error: Cannot find module './build/webpack/undefined'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/Users/naturgewalt/Coding/cosapien.com/react-redux-jwt-auth-example/webpack.config.js:4:18)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
Jan-Jan commented 8 years ago

PS. I'm running node v4.2.1

joshgeller commented 8 years ago

You need to run export NODE_ENV=development

Take a look at the readme for the full instructions.