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

Not able to start the 'website' #122

Closed
kennydee opened this issue Mar 5, 2015 · 8 comments
Closed

Not able to start the 'website' #122

kennydee opened this issue Mar 5, 2015 · 8 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@kennydee
Copy link
Contributor

kennydee commented Mar 5, 2015

Hi everybody,

I just found the "website" part of react-native this morning (thanks to a commit from Christopher). This is not obvious because not mentioned on the main readme :)

  1. The npm install works fine, without error, but when i try to npm start, i got the following error :
npm start

> @ start /Users/.../react-native/website
> node server/server.js


module.js:340
    throw err;
          ^
Error: Cannot find module '../react-docgen'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/.../react-native/website/server/extractDocs.js:1:74)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.10.21
npm ERR! npm  v2.1.3
npm ERR! code ELIFECYCLE
npm ERR! @ start: `node server/server.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node server/server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/.../react-native/website/npm-debug.log

Here is also the output of the npm-debug.log if helpfull :

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart @
6 info start @
7 verbose unsafe-perm in lifecycle true
8 info @ Failed to exec start script
9 verbose stack Error: @ start: `node server/server.js`
9 verbose stack Exit status 8
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:212:16)
9 verbose stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
9 verbose stack     at maybeClose (child_process.js:735:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:802:5)
10 verbose pkgid @
11 verbose cwd /Users/.../react-native/website
12 error Darwin 14.0.0
13 error argv "node" "/usr/local/bin/npm" "start"
14 error node v0.10.21
15 error npm  v2.1.3
16 error code ELIFECYCLE
17 error @ start: `node server/server.js`
17 error Exit status 8
18 error Failed at the @ start script.
18 error This is most likely a problem with the  package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     node server/server.js
18 error You can get their info via:
18 error     npm owner ls
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

I'm on Osx, and i'm up to date with this repo.
I keep up trying some stuff, and discover, than when doing an "npm install" in the react-docgen folder, the npm start then work.
Is this instruction missing from the readme, or am i doing anything wrong ?

  1. But then, when hitting http://localhost:8080/react-native/index.html i got the following error in my browser :
Connect
500 TypeError: Cannot read property 'node' of undefined
at resolveToValue (/Users/.../react-native-tmp/website/react-docgen/dist/utils/resolveToValue.js:25:18)
at propTypeHandler (/Users/.../react-native-tmp/website/react-docgen/dist/handlers/propTypeHandler.js:103:23)
at /Users/.../react-native-tmp/website/react-docgen/dist/parse.js:25:49
at Array.forEach (native)
at /Users/.../react-native-tmp/website/react-docgen/dist/parse.js:25:14
at Array.map (native)
at executeHandlers (/Users/.../react-native-tmp/website/react-docgen/dist/parse.js:23:31)
at parse (/Users/.../react-native-tmp/website/react-docgen/dist/parse.js:65:54)
at Object.defaultParse [as parse] (/Users/.../react-native-tmp/website/react-docgen/dist/main.js:53:10)
at docsToMarkdown (/Users/.../react-native-tmp/website/server/extractDocs.js:15:19)

What am i missing again ?

Thanks again for the incredible work on react-native.
I also hope, those error are real, not local to my computer, and not making you loose some time. sorry if i am. Or maybe, the website section is not ready to use yet ?

Thanks
Kenny

@amasad
Copy link
Contributor

amasad commented Mar 5, 2015

Cc @vjeux do we start the website with npm start?

@kennydee
Copy link
Contributor Author

kennydee commented Mar 5, 2015

@fkling
Copy link
Contributor

fkling commented Mar 5, 2015

You have to run npm install inside website/react-dcogen first. This is only temporary until react-docgen is available as npm module.

I will check what's up with the second error.

@fkling
Copy link
Contributor

fkling commented Mar 5, 2015

I can repro the second the error with a fresh npm install. Will investigate.

@kennydee
Copy link
Contributor Author

kennydee commented Mar 5, 2015

@fkling yes, thanks, that's what i figured in my point n°1. I could make a PR to improve the readme on this if you want ?

Oh glad you repro, it's not me :)
Thanks again.

@fkling
Copy link
Contributor

fkling commented Mar 5, 2015

I could make a PR to improve the readme on this if you want ?

That would be great! Thanks!

@fkling
Copy link
Contributor

fkling commented Mar 5, 2015

This was definitely a bug from my side, which is now fixed. However, there is also a bug in ExpandingText.js I believe. PropTypes should be propTypes. https://github.com/facebook/react-native/blob/master/Libraries/Text/ExpandingText.js#L35

@kennydee
Copy link
Contributor Author

kennydee commented Mar 5, 2015

Yes, the website is now running ! Huge thanks :)

@kennydee kennydee closed this as completed Mar 5, 2015
@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants