Open joshualinog opened 9 years ago
crappy critique on my part: so here goes:
ok, so changed approach. kind of getting further... here are the instructions i am using now: *( already ran "npm install -g baked")
any advice, i will keep tinkering.
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:
baked
baked
command with npm install -f baked
examples/vanilla
baked
generated/
directorygulp
examples/stylus
npm install
gulp serve
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 :-)
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 :-)
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 :).
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 ;-)
@jajourda do you still have problems? (can I close this issue or can I help? :p)
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
@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
I keep getting errors when trying to follow the instructions as worded.