Module build failed: Error: Couldn't find preset "react-app" relative to directory
dbkaplun opened this issue · 3 comments
dbkaplun commented
Module build failed: Error: Couldn't find preset "react-app" relative to directory "/Users/dan/stuff/unglish/node_modules/react-vis-force"
at /Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/file/options/option-manager.js:298:19
at Array.map (native)
at OptionManager.resolvePresets (/Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/file/options/option-manager.js:269:20)
at OptionManager.mergePresets (/Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/file/options/option-manager.js:258:10)
at OptionManager.mergeOptions (/Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/file/options/option-manager.js:243:14)
at OptionManager.init (/Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/file/options/option-manager.js:373:12)
at File.initOptions (/Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/file/index.js:221:65)
at new File (/Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/file/index.js:141:24)
at Pipeline.transform (/Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/Users/dan/stuff/unglish/node_modules/babel-loader/index.js:38:20)
Usage:
import {ForceGraph, ForceGraphNode, ForceGraphLink} from 'react-vis-force';
Then after npm install babel-preset-react-app
:
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/dan/stuff/unglish/node_modules/babel-preset-react-app/index.js")
at Object.<anonymous> (/Users/dan/stuff/unglish/node_modules/babel-preset-react-app/index.js:49:9)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at /Users/dan/stuff/unglish/node_modules/babel-core/lib/transformation/file/options/option-manager.js:301:17
at Array.map (native)
fastfrwrd commented
What's your node version and your npm version? we haven't had this problem using the library as-is, but curious if there's some case I haven't tried.
fastfrwrd commented
@dbkaplun I'm going to close this out as we've had other contributions successfully, but please let me know if you're still having issues. Cheers!
itsmitul commented
npm audit fix
This fixed the problem for me