-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Errors with node modules while serving #57
Comments
i got same issue. did u fixed ? @WilsonPhoo |
I got it to run by adding all these to the index.js in the server folder.
package.json dependencies: For the jquery portion, node does not expose the window object so it does not work for server rendering. I made it work by using the script tag in index.html instead of the npm package. You will also need this global npm package to expose the window object. There is still a problem if you are using the window object on componentDidMount. You might want to do something like this and delay usage to avoid errors. I am still experimenting... hope it helps! |
Hey, my apologies for the long wait @WilsonPhoo - I'm looking to ensure this is fixed with version 2.0. If you're interested, I could really use your thoughts for what you'd like to see in the upcoming version. Feel free to comment on the issue here with any suggestions. :) |
Mainly lodash and jquery.
lodash:
jquery:
Also, how are we able to use absolute path?
For eg, I cannot do this:
import { SET_SOMETHING } from 'actions/someActions';
I have to do this:
import { SET_SOMETHING } from '../../actions/someActions';
Any idea how to solve these?
Thanks!
The text was updated successfully, but these errors were encountered: