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
{{ message }}
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.
This happens when I'm using the domquery module. The issue can be reproduced in the following four steps: #1. install the components
$ npm install domquery; npm install matches-selector; npm install closest; npm install event; #2. change the following file:
--- a/app/Home/index.jsx
+++ b/app/Home/index.jsx
@@ -1,5 +1,6 @@
var React = require("react");
var Link = require("react-router").Link;
+var dom = require('domquery') #3. run build
$ npm run build; #4. run start, which gives the error:
/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5860
var doc = document
^
ReferenceError: document is not defined
at /Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5860:14
at doc (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5856:73)
at Object. (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5859:4)
at webpack_require (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:21:30)
at Object.module.exports.module.exports (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5029:14)
at webpack_require (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:21:30)
at Object. (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:4760:17)
at webpack_require (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:21:30)
at Object. (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:4987:15)
at webpack_require (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:21:30)
npm ERR! react-starter@0.0.0 start: node lib/server-production
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the react-starter@0.0.0 start script.
npm ERR! This is most likely a problem with the react-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/server-production
npm ERR! You can get their info via:
npm ERR! npm owner ls react-starter
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! cwd /Users/shen/Documents/workspace/react-starter
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/shen/Documents/workspace/react-starter/npm-debug.log
npm ERR! not ok code 0
What is the cause of this error? Please help! Thanks.
The text was updated successfully, but these errors were encountered:
This happens when I'm using the domquery module. The issue can be reproduced in the following four steps:
#1. install the components
$ npm install domquery; npm install matches-selector; npm install closest; npm install event;
#2. change the following file:
--- a/app/Home/index.jsx
+++ b/app/Home/index.jsx
@@ -1,5 +1,6 @@
var React = require("react");
var Link = require("react-router").Link;
+var dom = require('domquery')
#3. run build
$ npm run build;
#4. run start, which gives the error:
$ npm run start
error message below
/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5860
var doc = document
^
ReferenceError: document is not defined
at /Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5860:14
at doc (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5856:73)
at Object. (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5859:4)
at webpack_require (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:21:30)
at Object.module.exports.module.exports (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:5029:14)
at webpack_require (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:21:30)
at Object. (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:4760:17)
at webpack_require (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:21:30)
at Object. (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:4987:15)
at webpack_require (/Users/shen/Documents/workspace/react-starter/build/prerender/main.js:21:30)
npm ERR! react-starter@0.0.0 start:
node lib/server-production
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the react-starter@0.0.0 start script.
npm ERR! This is most likely a problem with the react-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/server-production
npm ERR! You can get their info via:
npm ERR! npm owner ls react-starter
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! cwd /Users/shen/Documents/workspace/react-starter
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/shen/Documents/workspace/react-starter/npm-debug.log
npm ERR! not ok code 0
What is the cause of this error? Please help! Thanks.
The text was updated successfully, but these errors were encountered: