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

Issue with NODE_ENV #43

Closed
giovanni-bertoncelli opened this issue May 5, 2021 · 4 comments
Closed

Issue with NODE_ENV #43

giovanni-bertoncelli opened this issue May 5, 2021 · 4 comments

Comments

@giovanni-bertoncelli
Copy link

First of all: great project! It is helping me a lot...

I was wondering why there is a check on the NODE_ENV environment variable inside the osllo/validator package. I have set that for my environment needs and I have to manually reset that when I want to use this package... Is that necessary to determine that it is not a node environment?

@Ghustavh97
Copy link
Contributor

/**
 * Try to detect if node or browser build in webpack
 */
if (typeof process.env.NODE_ENV === "undefined" && isNode && !isBrowser) {

Looks like I made the mistake of calling NODE_ENV directly without checking if the other keys or the process variable is set.

I did this to try and support both node and browser environments, but it seems like using the validator for this package is a bit over kill so I will push a fix to remove it and make svg-fixer use its own validation functions.

@Ghustavh97
Copy link
Contributor

@giovanni-bertoncelli could you please provide me with a way to reproduce the error so that I can confirm that I have fixed it?

@giovanni-bertoncelli
Copy link
Author

Try running the node process with NODE_ENV=dev

@Ghustavh97
Copy link
Contributor

@giovanni-bertoncelli Thanks! Please try the latest version 1.2.1 to see if the issue has been fixed.

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

2 participants