Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module build failed: Error: Using babel-preset-react-app requires that you specify NODE_ENV or #99

Closed
HayenPhan opened this issue Jun 16, 2018 · 2 comments

Comments

@HayenPhan
Copy link

HayenPhan commented Jun 16, 2018

Module build failed: Error: Using babel-preset-react-app requires that you specify NODE_ENV or BABEL_ENV environment variables. Valid values are "development", "test", and "production". Instead, received: undefined. (While processing preset: "/Users/hayen/code/node_modules/babel-preset-react-app/index.js")
at Object. (/Users/hayen/code/node_modules/babel-preset-react-app/index.js:51:9)
at Module._compile (module.js:643:30)
at Module._compile (/Users/hayen/code/headless-wp-starter/frontend/node_modules/source-map-support/source-map-support.js:492:25)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at /Users/hayen/code/headless-wp-starter/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:296:17

@ multi ./pages?entry


How can I fix this? This happens when I try to run frontend

  • node version v8.9.4
@fullmetalsheep
Copy link

facebook/create-react-app#2377

this solves it.

@tristanoneil
Copy link
Contributor

@HayenPhan It looks like there might be an issue with another node_modules directory being at the same level as headless-wp-starter. Could you try removing or moving /Users/hayen/code/node_modules and trying again?

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

No branches or pull requests

4 participants