Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Unable to run tailor examples #125

Closed
naragon opened this issue Feb 22, 2017 · 7 comments
Closed

Unable to run tailor examples #125

naragon opened this issue Feb 22, 2017 · 7 comments

Comments

@naragon
Copy link

naragon commented Feb 22, 2017

When I run npm install after cloning the tailor project I get the following errror. Subsequently if I try to run the basic example using 'node examples/basic', I get 'template not found' error at http://localhost:8080

> execSync@1.0.2 install /Users/naragon/projects/tailor/node_modules/execSync
> node install.js

[execsync v1.0.2] Attempting to compile native extensions.
[execSync v1.0.2]
    Native code compile failed!!

> websocket@1.0.24 install /Users/naragon/projects/tailor/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node

> pre-commit@1.2.2 install /Users/naragon/projects/tailor/node_modules/pre-commit
> node install.js

pre-commit:
pre-commit: Detected an existing git pre-commit hook
pre-commit: Old pre-commit hook backuped to pre-commit.old
pre-commit:

> wd@1.1.3 install /Users/naragon/projects/tailor/node_modules/wd
> node scripts/build-browser-scripts

OS: Mac OS X Yosemite (10.10.5)
node: v6.10.0
npm: 3.10.10

@dazld
Copy link
Contributor

dazld commented Feb 22, 2017

the examples are really bare bones, this tripped me up too, which means we should improve them.

the template not found error is because you are looking at /, and there is no redirect or concept of a default fragment route on the example.

try adding index, eg http://localhost:8080/index and hopefully you should see something.

does that help?

@addityasingh
Copy link
Contributor

@dazld I had the same issue yesterday. I was trying to debug Tailor yesterday by running the examples, by using node --inspect --debug-brk index.js. But the debugger never hit the request-handler file while requesting the tailor url http://localhost:8080/index, but the fragment server at http://localhost:8081 was returning the right response. It's good that @naragon created this issue

@naragon
Copy link
Author

naragon commented Feb 22, 2017

Yep, this - http://localhost:8080/index - worked. I should have read the instructions more carefully. Thank you much.

@naragon naragon closed this as completed Feb 22, 2017
@dazld
Copy link
Contributor

dazld commented Feb 23, 2017

@addityasingh could you open a new issue for this, with some repro steps?

@naragon no problem! glad to help :)

@vigneshshanmugam
Copy link
Collaborator

vigneshshanmugam commented Feb 23, 2017

@addityasingh you should run node --inspect examples/* and navigate to localhost:8080/index..

Running node --inspectindex.js` wont hit anything because its the tailor lib file.. We need to create tailor instance and create a server to render things. This is what exactly done in examples folder

@addityasingh
Copy link
Contributor

addityasingh commented Feb 23, 2017

@vigneshshanmugam But I am running this command inside /tailor/examples/basic-css-and-js folder. In that case index.js points to index file of the basic-css-and-js and I think node --inspect --debug-brk index.js should work

@vigneshshanmugam
Copy link
Collaborator

@addityasingh Dont think you need --debug-brk flag though for >6.. I just tried and it works for me

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

No branches or pull requests

4 participants