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

Development server not working #64

Closed
jaylynch opened this issue Sep 20, 2018 · 2 comments
Closed

Development server not working #64

jaylynch opened this issue Sep 20, 2018 · 2 comments
Labels

Comments

@jaylynch
Copy link

If I follow the instructions in CONTRIBUTING.md, I am unable to get the dev server to run, with any amount of prodding.

OSX 10.13.4, Node 10.10.0, nvm or system/Brew didn't seem to matter.

Playing around with config to try to get it to run or checking out an earlier version will sometimes provide ES module / Babel looking errors but checkout out current master and following the instructions provides:

npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > react-head@3.0.0 prepare /Users/jay/proj/ass/react-head
npm ERR! prepareGitDep > npm run test && npm run build
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > react-head@3.0.0 test /Users/jay/proj/ass/react-head
npm ERR! prepareGitDep > jest --no-cache
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! prepareGitDep FAIL tests/ssr.test.js
npm ERR! prepareGitDep   ● fails if headTags is not passed to <HeadProvider />
npm ERR! prepareGitDep
npm ERR! prepareGitDep     expect(function).toThrowError(regexp)
npm ERR! prepareGitDep
npm ERR! prepareGitDep     Expected the function to throw an error matching:
npm ERR! prepareGitDep       /headTags array should be passed/
npm ERR! prepareGitDep     Instead, it threw:
npm ERR! prepareGitDep       ReferenceError: invariant is not defined
npm ERR! prepareGitDep           69 |
npm ERR! prepareGitDep           70 |   render() {
npm ERR! prepareGitDep         > 71 |     invariant(
npm ERR! prepareGitDep              |     ^
npm ERR! prepareGitDep           72 |       typeof window !== 'undefined' || Array.isArray(this.props.headTags),
npm ERR! prepareGitDep           73 |       'headTags array should be passed to <HeadProvider /> in node'
npm ERR! prepareGitDep           74 |     );
npm ERR! prepareGitDep
npm ERR! prepareGitDep       at HeadProvider.render (src/HeadProvider.js:71:5)
npm ERR! prepareGitDep       at d (node_modules/react-dom/cjs/react-dom-server.node.production.min.js:28:211)
npm ERR! prepareGitDep       at wa (node_modules/react-dom/cjs/react-dom-server.node.production.min.js:28:493)
npm ERR! prepareGitDep       at a.render (node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:48)
npm ERR! prepareGitDep       at a.read (node_modules/react-dom/cjs/react-dom-server.node.production.min.js:32:288)
npm ERR! prepareGitDep       at renderToStaticMarkup (node_modules/react-dom/cjs/react-dom-server.node.production.min.js:43:75)
npm ERR! prepareGitDep       at tests/ssr.test.js:76:5
npm ERR! prepareGitDep       at Object.<anonymous> (node_modules/expect/build/to_throw_matchers.js:51:9)
npm ERR! prepareGitDep       at Object.throwingMatcher [as toThrowError] (node_modules/expect/build/index.js:320:33)
npm ERR! prepareGitDep       at Object.toThrowError (tests/ssr.test.js:81:6)
npm ERR! prepareGitDep       at Object.toThrowError (tests/ssr.test.js:81:6)
npm ERR! prepareGitDep
npm ERR! prepareGitDep   ● fails if headTags is not an array
npm ERR! prepareGitDep
npm ERR! prepareGitDep     expect(function).toThrowError(regexp)
npm ERR! prepareGitDep
npm ERR! prepareGitDep     Expected the function to throw an error matching:
@tizmagik
Copy link
Owner

Thanks for reporting, @jaylynch -- not sure what's going on exactly (I assume something to do with node 10), so for now I changed the example install step from npm i to npm ci and it seems to work. PR here, #67

@jaylynch
Copy link
Author

Looks like that's done it, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants