ruph0us
02/09/2022, 3:40 PMScriptAutomate
02/09/2022, 3:51 PMbash
npx dendron buildSite --stage prod
With
bash
npx dendron publish init && npx dendron publish export && mv .next/out docs
ScriptAutomate
02/09/2022, 3:52 PMruph0us
02/09/2022, 4:22 PMScriptAutomate
02/09/2022, 4:32 PMruph0us
02/10/2022, 4:45 PMruph0us
02/14/2022, 4:33 PMruph0us
02/14/2022, 4:34 PMruph0us
02/14/2022, 4:35 PMruph0us
02/14/2022, 4:35 PMnpx dendron publish init && npx dendron publish export && mv .next/out docs
command not found: dendron
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `npx dendron publish init && npx dendron publish export && mv .next/out docs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-02-14T13_30_13_593Z-debug.log
ScriptAutomate
02/14/2022, 7:28 PMpackage.json
in the root
- If you are using yarn
or npm
to install packages
Example repo:
- https://github.com/dendronhq/template.publish.netlify
- package.json
present (with *
for version)
- yarn.lock
present, generated by yarn
Netlify executes:
- https://github.com/dendronhq/template.publish.netlify/blob/main/dendron-publish-site.sh
Commands of importance:
- yarn
(installs everything in yarn.lock
)
- npm
would work the same way, if using package-lock.json
This upgrading and maintaining of Dendron CLI versions is something I intend to document in our publishing docs.
If you aren't sure, try the following:
- Add package.json
from the Netlify template to root of your workspace
- Run yarn
in your workspace to generate the yarn.lock
file. If yarn
isn't installed, can do npm install -g yarn
- Add both package.json
and yarn.lock
to git
- Change your publishing command to two commands:
bash
yarn
npx dendron publish init && npx dendron publish export && mv .next/out docs
ScriptAutomate
02/14/2022, 7:39 PMyarn upgrade
which will update the yarn.lock
file to use latest dendron cliruph0us
02/15/2022, 1:27 PMruph0us
02/15/2022, 1:28 PMScriptAutomate
02/15/2022, 1:37 PMdendron.yml
dictate certain publishing config settingsruph0us
02/15/2022, 1:40 PMScriptAutomate
02/15/2022, 2:21 PMruph0us
02/16/2022, 12:13 PMruph0us
02/16/2022, 12:15 PMruph0us
02/16/2022, 12:16 PMruph0us
02/16/2022, 1:39 PM