Skip to content
This repository has been archived by the owner on Sep 12, 2020. It is now read-only.

.env file not found #43

Open
landrail8 opened this issue May 30, 2018 · 1 comment
Open

.env file not found #43

landrail8 opened this issue May 30, 2018 · 1 comment

Comments

@landrail8
Copy link

I'm working on this manual

  1. git clone https://github.com/joshgeller/react-redux-jwt-auth-example.git
  2. npm install
  3. export NODE_ENV=development
  4. node server.js

and get this trouble after step 4

➜ workspace: git clone https://github.com/joshgeller/react-redux-jwt-auth-example.git ➜ workspace: cd react-redux-jwt-auth-example ➜ react-redux-jwt-auth-example git:(master): npm install ... ➜ react-redux-jwt-auth-example git:(master): export NODE_ENV=development ➜ react-redux-jwt-auth-example git:(master): node server.js { Error: ENOENT: no such file or directory, open '.env' at Object.fs.openSync (fs.js:558:18) at Object.fs.readFileSync (fs.js:468:33) at Object.config (/Users/user/workspace/react-redux-jwt-auth-example/node_modules/dotenv/lib/main.js:30:37) at Object.<anonymous> (/Users/user/workspace/react-redux-jwt-auth-example/config/index.js:5:8) at Module._compile (module.js:571:32) at normalLoader (/Users/user/workspace/react-redux-jwt-auth-example/node_modules/babel-core/lib/api/register/node.js:199:5) at Object.require.extensions.(anonymous function) [as .js] (/Users/user/workspace/react-redux-jwt-auth-example/node_modules/babel-core/lib/api/register/node.js:216:7) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' } ==> 🌎 Listening on port 3000. Open up http://localhost:3000/ in your browser. webpack built 54cbad467471f8bcf70c in 5390ms

@arturcorvino
Copy link

arturcorvino commented Sep 13, 2018

@landrail8 you can try this.

Upgrade a module in package.json #42

"dotenv": "^1.2.0" to "dotenv": "^4.0.0"

It work for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants