You are current using minified code outside of NODE_ENV === 'production'

#1

This issue started about two days ago when I wanted to test my production build with minified code as I had an application crash that was only occurring in production. The XDE doesn’t have any options for minificiation and setting Development mode to false still provides a non-minified version of the application.

So I used the following command to run and test my application (And fix the crash).

exp start --no-dev --minify --lan

Ever since then I’ve gotten the following error (Even when running in XDE with development mode enabled, or using the command line to issue a exp start --dev --no-minify --lan to try to force it to not minify).

"You are currently using minified code outside of NODE_ENV === ‘production’. This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) to ensure you have the correct code for your production build.

It seems that no matter what flags I pass to exp or rather or not I’m using development mode or not in XDE I’m always getting “minified code”. I’ve also noticed this in my RedBoxes because my errors are always on line 129759012750192 or something, which is really annoying.

0 Likes

You are currently running minified code outside of NODE_ENV === "production"
#2

Does clearing caches resolve it?
watchman watch-del-all && rm -rf node_modules && rm -rf $TMPDIR/react-* && npm i

0 Likes

closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

0 Likes