This wednesday (2:30PM IST as usual), I am going to build the official website for Build With Hussain YT channel live! I am going to use astro (with TailwindCSS) to build a static site and then use Frappe as a CMS for dynamic content and forms on our site. Join in to learn more:
Hit the Notify Me button to stay notified when the episode goes live!
Here is a sneak peek of what we are going to build:
In today’s episode of #BuildWithHussain, we are going to do the following:
Build a static site (buildwithhussain.dev) with astro and tailwindCSS
Create a new FC site (with custom domain and private bench) and use Frappe as CMS for our static site, using frappe-js-sdk for talking to our site using REST API
Deploy the site to GitHub pages and auto trigger deploys using webhooks from our Frappe site!!
Collect data from our static site and send it to CMS
/home/dhairya/projects/node_modules/frappe-js-sdk/lib/frappe_app/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/home/dhairya/projects/node_modules/frappe-js-sdk/lib/utils/axios.js:4:15)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
2:48:35 PM [vite] Error when evaluating SSR module /home/dhairya/projects/src/pages/schedule.astro: failed to import “/src/layouts/Layout.astro”
|- Error: Cannot find module ‘axios’
Require stack:
/home/dhairya/projects/node_modules/frappe-js-sdk/lib/frappe_app/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/home/dhairya/projects/node_modules/frappe-js-sdk/lib/utils/axios.js:4:15)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
02:51:27 PM [astro] Unable to load /home/dhairya/projects/astro.config.mjs
error Missing “./config” specifier in “astro” package
File:
/home/dhairya/projects/.temp.1687857687314.config.mjs
Stacktrace:
Error: Missing “./config” specifier in “astro” package
at e (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:16647:25)
at n (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:16647:627)
at o (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:16647:1297)
at resolveExportsOrImports (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:23405:20)
at resolveDeepImport (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:23424:31)
at tryNodeResolve (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:23113:20)
at Context.resolveId (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:22874:28)
at Object.resolveId (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:42847:46)
at async TransformContext.resolve (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:42575:23)
at async normalizeUrl (file:///home/dhairya/projects/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:40500:34)
02:51:27 PM [astro] Continuing with previous valid configuration
TypeError: Cannot read properties of undefined (reading ‘map’)
at eventConfigError (file:///home/dhairya/projects/node_modules/astro/dist/events/error.js:23:34)
at handleConfigError (file:///home/dhairya/projects/node_modules/astro/dist/cli/index.js:81:45)
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
dhairya@dhairya-IdeaPad-Flex-5-14IIL05:~/projects$ yarn dev
yarn run v1.22.19
warning package.json: No license field
$ astro dev
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath ‘./config’ is not defined by “exports” in /home/dhairya/projects/node_modules/astro/package.json imported from /home/dhairya/projects/astro.config.mjs
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
facing this error after the step of adding api key and api secret in .env file and watching the tutorial