You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Tyler. I used your rrssr-v4 template for my own project. I inserted my react application into the App.js that you created. What happened after running webpack -w is I get the error mentioned above (document is not defined) when I run nodemon server.js. I know document is a DOM variable which should not be defined in the server, hence the error.
Below is my error, package.json, and webpack.config.js. From the error, it looks like it has some problem with the webpack style-loader I use. Do you know why?
ReferenceError: document is not defined
at insertStyleElement (webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?:93:15)
at addStyle (webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?:208:13)
at modulesToDom (webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?:81:18)
at module.exports (webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?:239:25)
at eval (webpack:///./src/shared/css/home-style.css?:15:14)
The text was updated successfully, but these errors were encountered:
kabison33
changed the title
Reference: document is not defined
running nodemon server.js ----> Reference: 'document' is not defined
Aug 15, 2020
kabison33
changed the title
running nodemon server.js ----> Reference: 'document' is not defined
running nodemon server.js --> Reference: 'document' is not defined
Aug 15, 2020
Hey Tyler. I used your
rrssr-v4
template for my own project. I inserted my react application into theApp.js
that you created. What happened after runningwebpack -w
is I get the error mentioned above (document
is not defined) when I runnodemon server.js
. I knowdocument
is aDOM
variable which should not be defined in the server, hence the error.Below is my error,
package.json
, andwebpack.config.js
. From the error, it looks like it has some problem with the webpackstyle-loader
I use. Do you know why?package.json
webpack.config.js
The text was updated successfully, but these errors were encountered: