-
Notifications
You must be signed in to change notification settings - Fork 431
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
how to set ENV? #263
Comments
Try this
|
Didn't work, also tried setting ENV and NODE_ENV environmental variables and in the root .env file to "development" |
How are you running the app right now? Have you tried doing something like |
Hi, that didn't work either. I don't see any evidence that either the
environment variables or the root .env file are being used at all.
…On Thu, Jul 6, 2017 at 4:29 PM, Ali Al Dallal ***@***.***> wrote:
How are you running the app right now? Have you tried doing something like NODE_ENV=debug
npm start ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#263 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKCZvAMigxdvXMJ1ThjhEJCzyEQyx1nZks5sLUOWgaJpZM4OPlKb>
.
|
Can you show some snippet of your code as to how you're using it? |
in App.jsx:
import Nice from './nice'
import Evil from './evil'
import wrapReactLifecycleMethods, { config } from 'react-component-errors'
config.errorHandler = (errorReport) => {
console.error(`Error in ${errorReport.component}.${errorReport.method}(${(
errorReport.arguments ? '...' : '')}): ${errorReport.error}`, errorReport);
}
@wrapReactLifecycleMethods
export default class App extends React.Component
…On Thu, Jul 6, 2017 at 6:06 PM, Ali Al Dallal ***@***.***> wrote:
Can you show some snippet of your code as to how you're using it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#263 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKCZvBQ1QUYiLiXKHQT1cN37bTNl4E30ks5sLVpZgaJpZM4OPlKb>
.
|
Nice.jsx
const Nice = () =>
<div>
Nice
</div>
export default Nice
…On Thu, Jul 6, 2017 at 8:07 PM, Mark Oliver ***@***.***> wrote:
in App.jsx:
import Nice from './nice'
import Evil from './evil'
import wrapReactLifecycleMethods, { config } from 'react-component-errors'
config.errorHandler = (errorReport) => {
console.error(`Error in ${errorReport.component}.${errorReport.method}(${(
errorReport.arguments ? '...' : '')}): ${errorReport.error}`, errorReport
);
}
@wrapReactLifecycleMethods
export default class App extends React.Component
On Thu, Jul 6, 2017 at 6:06 PM, Ali Al Dallal ***@***.***>
wrote:
> Can you show some snippet of your code as to how you're using it?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#263 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AKCZvBQ1QUYiLiXKHQT1cN37bTNl4E30ks5sLVpZgaJpZM4OPlKb>
> .
>
|
Evil.jsx
const Evil = () =>
<div>
{this.does.not.exist}
</div>
export default Evil
…On Thu, Jul 6, 2017 at 8:08 PM, Mark Oliver ***@***.***> wrote:
Nice.jsx
const Nice = () =>
<div>
Nice
</div>
export default Nice
On Thu, Jul 6, 2017 at 8:07 PM, Mark Oliver ***@***.***>
wrote:
> in App.jsx:
> import Nice from './nice'
> import Evil from './evil'
> import wrapReactLifecycleMethods, { config } from
> 'react-component-errors'
>
> config.errorHandler = (errorReport) => {
> console.error(`Error in ${errorReport.component}.${errorReport.method}(${
> (errorReport.arguments ? '...' : '')}): ${errorReport.error}`,
> errorReport);
> }
>
> @wrapReactLifecycleMethods
> export default class App extends React.Component
>
>
> On Thu, Jul 6, 2017 at 6:06 PM, Ali Al Dallal ***@***.***>
> wrote:
>
>> Can you show some snippet of your code as to how you're using it?
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#263 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AKCZvBQ1QUYiLiXKHQT1cN37bTNl4E30ks5sLVpZgaJpZM4OPlKb>
>> .
>>
>
>
|
have this div in app.jsx render
<div>
<Nice />
<Evil />
<Nice />
</div>
…On Thu, Jul 6, 2017 at 8:09 PM, Mark Oliver ***@***.***> wrote:
Evil.jsx
const Evil = () =>
<div>
{this.does.not.exist}
</div>
export default Evil
On Thu, Jul 6, 2017 at 8:08 PM, Mark Oliver ***@***.***>
wrote:
> Nice.jsx
> const Nice = () =>
> <div>
> Nice
> </div>
>
> export default Nice
>
> On Thu, Jul 6, 2017 at 8:07 PM, Mark Oliver ***@***.***>
> wrote:
>
>> in App.jsx:
>> import Nice from './nice'
>> import Evil from './evil'
>> import wrapReactLifecycleMethods, { config } from
>> 'react-component-errors'
>>
>> config.errorHandler = (errorReport) => {
>> console.error(`Error in ${errorReport.component}.${errorReport.method}(
>> ${(errorReport.arguments ? '...' : '')}): ${errorReport.error}`,
>> errorReport);
>> }
>>
>> @wrapReactLifecycleMethods
>> export default class App extends React.Component
>>
>>
>> On Thu, Jul 6, 2017 at 6:06 PM, Ali Al Dallal ***@***.***>
>> wrote:
>>
>>> Can you show some snippet of your code as to how you're using it?
>>>
>>> —
>>> You are receiving this because you authored the thread.
>>> Reply to this email directly, view it on GitHub
>>> <#263 (comment)>,
>>> or mute the thread
>>> <https://github.com/notifications/unsubscribe-auth/AKCZvBQ1QUYiLiXKHQT1cN37bTNl4E30ks5sLVpZgaJpZM4OPlKb>
>>> .
>>>
>>
>>
>
|
I don't see where you are using |
Used https://www.npmjs.com/package/dotenv-webpack
[image: Inline image 1]
…On Fri, Jul 7, 2017 at 1:03 AM, Ali Al Dallal ***@***.***> wrote:
I don't see where you are using env anywhere?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#263 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKCZvKbnx1X-5jlQnBHJJZTeuhdFyKOgks5sLbwtgaJpZM4OPlKb>
.
|
Also tried this
[image: Inline image 1]
…On Fri, Jul 7, 2017 at 1:24 PM, Mark Oliver ***@***.***> wrote:
Used https://www.npmjs.com/package/dotenv-webpack
[image: Inline image 1]
On Fri, Jul 7, 2017 at 1:03 AM, Ali Al Dallal ***@***.***>
wrote:
> I don't see where you are using env anywhere?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#263 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AKCZvKbnx1X-5jlQnBHJJZTeuhdFyKOgks5sLbwtgaJpZM4OPlKb>
> .
>
|
When I disabled the Grammarly extension the error went away, |
So I guess this is not an issue then? Closing for now :) |
Tried setting the Environment variable ENV to "debug" and putting ENV="debug" in a .env root file, still get this message: process.env.ENV is not defined, assuming 'prod' env
The text was updated successfully, but these errors were encountered: