Trying to follow the steps yarn build
and yarn dev
Running yarn build
gives me this error value undefined for x-algolia-api-key
Running yarn dev
I’m getting the error partial cannot be found guides_nav
Trying to follow the steps yarn build
and yarn dev
Running yarn build
gives me this error value undefined for x-algolia-api-key
Running yarn dev
I’m getting the error partial cannot be found guides_nav
Hey @guledali
Hmm, for the first error, are you possibly using an ENV var in the Web side? Wondering where the x-algolia-api-key is supposed to be imported/coming from…
And looks like a possible export/import error for the second one. I think you’ll need to tell us more about the file with the code for guides_nav
and where you are importing it?
[Edit: oooohhh, you mean the repo for our website… Thank you for ignoring me.]
Of course I can take you through everything,
First I clone the repo, git clone https://github.com/redwoodjs/redwoodjs.com.git
I run yarn install
command so far so good.
Now I ran the yarn build
and problem shows up, check the screenshot below.
The I ran the yarn dev
command and this is the output
I visit the http://127.0.0.1:8080/ and this is what I see
It’s being used in this file _nav.html
line 17 -19
<ul class="hidden ml-6 mt-2 mb-8">
@@include('guides_nav')
</ul
The guides dir has no nav partial, that supposed be generated when you ran yarn build
cmd
That nav item is built by the build process, assuming the build process completes successfully. If you want the full capability of the real site you’ll need to sign up for Algolia and get an API key so you can run the search seeding process.
If you don’t care about search, comment out this line in the build script (just make sure you don’t commit it to any branch that you plan on opening a PR against): https://github.com/redwoodjs/redwoodjs.com/blob/master/lib/build.js#L148
Can I ask why you’re building the site locally? If you want to add docs you can do that by appending to the list in lib/build.js
, or make modifications to the TUTORIAL.md
or NEWS.md
to add stuff there. I didn’t expect anyone but me to be running the whole thing locally!
Actually you should probably comment this line out as well, since this required file is where that ENV var is used: https://github.com/redwoodjs/redwoodjs.com/blob/master/lib/build.js#L13
I just added an .env.example
to root and an explanation in the README about what to do with it.
And this line as well