prismic-archive / baked.js

A static website generator in JS, powerered by prismic.io
https://prismicio.github.io/baked.js
91 stars 14 forks source link

trying to follow instructions #16

Open joshualinog opened 9 years ago

joshualinog commented 9 years ago

I keep getting errors when trying to follow the instructions as worded.

joshualinog commented 9 years ago

crappy critique on my part: so here goes:

  1. git clone https://github.com/prismicio/baked.js.git
  2. cd baked.js
  3. npm install -g baked
  4. npm install (this is for the installation of the package.json file's contents, most of which goes into node_modules)
  5. run "baked" -i am within the root directory of the project, and get the response: Config file not found Ne mangez pas trop vite
joshualinog commented 9 years ago

ok, so changed approach. kind of getting further... here are the instructions i am using now: *( already ran "npm install -g baked")

  1. git clone https://github.com/prismicio/baked.js.git
  2. cd baked.js/examples/blank 3.baked 4.npm install
  3. gulp serve
  4. navigate to http://127.0.0.1:8282/
  5. i see access denied.

any advice, i will keep tinkering.

dohzya commented 9 years ago

Hi,

thank you for your feedback :-)

For the 1st example: the https://github.com/prismicio/baked.js repository is the source code, not a ready-to-generate website's sources. That's why it didn't work: it had nothing to generate. There was an old to_generate directory which made you believe the opposite, I'm sorry for that (I removed it). Your second guess to go in examples was right :-)

The blank example is a template, to create your own website. So it did work. But nothing was generated since there are no files in it. Alas there is a problem in the dev web server we use: it returns “access denied” instead of “not found”. So it worked but the error message made you believe it didn't.

Note: the baked command used to get sources in the to_generate repository by default. I pushed the version 0.2.0 which fixes that.

So you have 2 ways to quickly try baked.js:

Note: the “required and assigne” logs are tests from the website source file, not error log from baked itself.

I hope there explications will help you :-)

dohzya commented 9 years ago

Hi, and thanks for your message!

I must say love your assumptions! :-D However it seems that the problem is on our side ;-)

There was a problem with default gulp helpers. We fixed it in the last version but the package.json file of the examples hasn't been updated accordingly… It's now done thanks to you.

Can you update your examples (or just update the version of the “baked” dependency from 0.2.1 to 0.3.0 in the package.json file) and try again? I confess I'd love to hear that it works that way, but if it doesn't just tell me and we'll start hunting :-)

amos-whitewolf commented 9 years ago

Hey Dohzya,

Sorry that i removed my comment, i tried it again after you committed yesterday and it worked perfectly. More assumptions on my end :P, and didn't want to waste your time. Thanks heaps for fixing that up, and explaining what was wrong, really helpful :).

dohzya commented 9 years ago

Haha, no problem… and without your removed comment (actually the 1st one :p) the fix would take longer and maybe more people would have experience your problem… so thanks to you ;-)

dohzya commented 9 years ago

@jajourda do you still have problems? (can I close this issue or can I help? :p)

tdurand commented 9 years ago

Running baked in the examples/vanilla directory give me the following error:

required and assigned: { myFunc: [Function] }
2015-07-07T14:37:13.552Z - error: render file '/Users/tdurand/Documents/ProjetFreelance/ExpeditionColombia/baked.js/examples/vanilla/index.html' null ... ERROR [2075ms]
2015-07-07T14:37:13.553Z - error: static render file '/Users/tdurand/Documents/ProjetFreelance/ExpeditionColombia/baked.js/examples/vanilla/index.html' null ... ERROR [2124ms]
ReferenceError: ejs:23
    21|     <!-- otherwise the javascript part will failed the 2nd time it will called -->
    22|     [% require("myLib.js", {noCache: true}) %]
 >> 23|     [% console.log("required and fetched from global:", myLib) %]
    24|
    25|     <div><a href="[%= pathTo('search', {typ: 'product', tag: 'Featured', page: 1}) %]">
    26|       Search

myLib is not defined
    at eval (eval at <anonymous> (/usr/local/lib/node_modules/baked/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:29:1058)
    at eval (eval at <anonymous> (/usr/local/lib/node_modules/baked/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:29:1408)
    at /usr/local/lib/node_modules/baked/node_modules/ejs/lib/ejs.js:255:15
    at Object.exports.render (/usr/local/lib/node_modules/baked/node_modules/ejs/lib/ejs.js:293:13)
    at render (/usr/local/lib/node_modules/baked/src/baked.js:50:18)
    at evalmachine.<anonymous>:1:1
    at renderTemplate (/usr/local/lib/node_modules/baked/src/baked.js:53:15)
    at renderContent (/usr/local/lib/node_modules/baked/src/baked.js:61:12)
    at /usr/local/lib/node_modules/baked/src/baked.js:237:24
    at _fulfilled (/usr/local/lib/node_modules/baked/node_modules/q/q.js:834:54)
1 errors:

/Users/tdurand/Documents/ProjetFreelance/ExpeditionColombia/baked.js/examples/vanilla/index.html:  { [ReferenceError: ejs:23
    21|     <!-- otherwise the javascript part will failed the 2nd time it will called -->
    22|     [% require("myLib.js", {noCache: true}) %]
 >> 23|     [% console.log("required and fetched from global:", myLib) %]
    24|
    25|     <div><a href="[%= pathTo('search', {typ: 'product', tag: 'Featured', page: 1}) %]">
    26|       Search

myLib is not defined] path: undefined }
/Users/tdurand/Documents/ProjetFreelance/ExpeditionColombia/baked.js/examples/vanilla/generated/index.html args: null
bbarker commented 8 years ago

@dohzya @tdurand I too am getting this error, though I ran the following command according to the instructions: baked --src . --dst ~/tmp/; Note that "." (currrent directory) is just a copy of `vanilla').

Here's the complete output:

brandon@BEBSURFACEPRO3:~/workspace/bbarker.github.io/src$ baked --src . --dst ~/tmp/
required and assigned: { myFunc: [Function] }
2016-10-03T14:52:07.246Z - error: render file './index.html' null ... ERROR [395ms]
2016-10-03T14:52:07.247Z - error: static render file './index.html' null ... ERROR [441ms]
ReferenceError: ejs:23
    21|     <!-- otherwise the javascript part will failed the 2nd time it will called -->
    22|     [% require("myLib.js", {noCache: true}) %]
 >> 23|     [% console.log("required and fetched from global:", myLib) %]
    24|
    25|     <div><a href="[%= pathTo('search', {typ: 'product', tag: 'Featured', page: 1}) %]">
    26|       Search

myLib is not defined
    at eval (eval at <anonymous> (/usr/local/lib/node_modules/baked/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:29:1058)
    at eval (eval at <anonymous> (/usr/local/lib/node_modules/baked/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:29:1408)
    at /usr/local/lib/node_modules/baked/node_modules/ejs/lib/ejs.js:255:15
    at Object.exports.render (/usr/local/lib/node_modules/baked/node_modules/ejs/lib/ejs.js:293:13)
    at render (/usr/local/lib/node_modules/baked/src/baked.js:50:18)
    at evalmachine.<anonymous>:1:1
    at renderTemplate (/usr/local/lib/node_modules/baked/src/baked.js:53:15)
    at renderContent (/usr/local/lib/node_modules/baked/src/baked.js:61:12)
    at /usr/local/lib/node_modules/baked/src/baked.js:237:24
    at _fulfilled (/usr/local/lib/node_modules/baked/node_modules/q/q.js:834:54)
1 errors:

./index.html:  { [ReferenceError: ejs:23
    21|     <!-- otherwise the javascript part will failed the 2nd time it will called -->
    22|     [% require("myLib.js", {noCache: true}) %]
 >> 23|     [% console.log("required and fetched from global:", myLib) %]
    24|
    25|     <div><a href="[%= pathTo('search', {typ: 'product', tag: 'Featured', page: 1}) %]">
    26|       Search

myLib is not defined] path: undefined }
/home/brandon/tmp/index.html args: null