We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi there,
I am building a react flux project using Node: v4.4.4, "react": "^15.3.2", "react-dom": "^15.0.1", "flux": "2.0.1",
I added the line ( import noCache from 'uperagent-no-cache';) in one of my action.js file
Worked great! But every time I try to put the EXACT SAME import statement in another action.js file, the project won't compile.
Got an error node_modules/superagent-no-cache/node_modules/component-ie/index.js:16 el = document.createElement('b'), ^
ReferenceError: document is not defined
Does anyone has any clue why this is happening?
The text was updated successfully, but these errors were encountered:
I am not sure whether this is the best solution, but after changing "import noCache from 'superagent-no-cache';" to
"var isBrowser = typeof window !== 'undefined'; "var noCache = isBrowser ? require(‘superagent') : undefined;"
It worked.
The reason it broke is similar to issue #10 . Node environment does not have "ie", thus I added the ternary expression.
Sorry, something went wrong.
@injune1123 I believe #23 should solve this problem. Do you agree?
No branches or pull requests
Hi there,
I am building a react flux project using
Node: v4.4.4,
"react": "^15.3.2",
"react-dom": "^15.0.1",
"flux": "2.0.1",
I added the line ( import noCache from 'uperagent-no-cache';) in one of my action.js file
Worked great! But every time I try to put the EXACT SAME import statement in another action.js file, the project won't compile.
Got an error
node_modules/superagent-no-cache/node_modules/component-ie/index.js:16
el = document.createElement('b'),
^
ReferenceError: document is not defined
Does anyone has any clue why this is happening?
The text was updated successfully, but these errors were encountered: