konstantinmuenster / gatsby-theme-portfolio-minimal

A Gatsby Theme to create modern one-page portfolios with a clean yet expressive design.
MIT License
161 stars 90 forks source link

I tried to use this theme and host it on netlify, im getting error #31

Closed drqxyzz closed 1 year ago

drqxyzz commented 1 year ago

Im completely new to GatsbyJS

There are the errors:

10:46:58 PM: error “gatsby-theme-portfolio-minimal” threw an error while running the createPages lifecycle: 10:46:58 PM: Cannot read properties of undefined (reading ‘path’) 10:46:58 PM: 10:46:58 PM: 10:46:58 PM: TypeError: Cannot read properties of undefined (reading ‘path’) 10:46:58 PM: 10:46:58 PM: - createPages.js:17 Object.module.exports [as createPages] 10:46:58 PM: [repo]/[gatsby-theme-portfolio-minimal]/src/gatsby/node/createPages.js:17:57 10:46:58 PM: - task_queues:95 processTicksAndRejections 10:46:58 PM: node:internal/process/task_queues:95:5 10:46:58 PM: 10:46:58 PM: - api-runner-node.js:487 runAPI 10:46:58 PM: [repo]/[gatsby]/src/utils/api-runner-node.js:487:16 10:46:58 PM: 10:46:58 PM: 10:46:58 PM: failed createPages - 0.299s 10:46:58 PM: ​ 10:46:58 PM: “build.command” failed 10:46:58 PM: ──────────────────────────────────────────────────────────────── 10:46:58 PM: ​ 10:46:58 PM: Error message 10:46:58 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums) 10:46:58 PM: ​ 10:46:58 PM: Error location 10:46:58 PM: In Build command from Netlify app: 10:46:58 PM: npm run build 10:46:58 PM: ​ 10:46:58 PM: Resolved config 10:46:58 PM: build: 10:46:58 PM: command: npm run build 10:46:58 PM: commandOrigin: ui 10:46:58 PM: environment: 10:46:58 PM: - NODE_VERSION 10:46:58 PM: publish: /opt/build/repo/public 10:46:58 PM: publishOrigin: ui 10:46:58 PM: plugins: 10:46:58 PM: - inputs: {} 10:46:58 PM: origin: ui 10:46:58 PM: package: ‘@netlify/plugin-gatsby’

10:46:59 PM: Node.js v18.0.0 10:46:59 PM: node:internal/modules/cjs/loader:942 10:46:59 PM: throw err; 10:46:59 PM: ^ 10:46:59 PM: Error: Cannot find module ‘./util.js’ 10:46:59 PM: Require stack: 10:46:59 PM: - /opt/build/repo/node_modules/yurnalist/dist/reporters/console/console-reporter.js 10:46:59 PM: - /opt/build/repo/node_modules/yurnalist/dist/index.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby-cli/lib/reporter/loggers/yurnalist/index.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby-cli/lib/reporter/start-logger.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby-cli/lib/reporter/index.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby/dist/schema/resolvers.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby/dist/schema/extensions/index.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby/dist/schema/types/type-defs.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby/dist/redux/reducers/inference-metadata.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby/dist/redux/reducers/index.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby/dist/redux/index.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby/dist/utils/jobs/worker-messaging.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby/dist/utils/worker/child/index.js 10:46:59 PM: - /opt/build/repo/node_modules/gatsby-worker/dist/child.js 10:46:59 PM: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:939:15) 10:46:59 PM: at Function.Module._load (node:internal/modules/cjs/loader:780:27) 10:46:59 PM: at Module.require (node:internal/modules/cjs/loader:1005:19) 10:46:59 PM: at require (node:internal/modules/cjs/helpers:102:18) 10:46:59 PM: at _load_util (/opt/build/repo/node_modules/yurnalist/dist/reporters/console/console-reporter.js:34:18) 10:46:59 PM: at ConsoleReporter.error (/opt/build/repo/node_modules/yurnalist/dist/reporters/console/console-reporter.js:267:19) 10:46:59 PM: at /opt/build/repo/node_modules/gatsby-cli/lib/reporter/loggers/yurnalist/index.js:166:13 10:46:59 PM: at dispatch (/opt/build/repo/node_modules/gatsby-cli/lib/reporter/redux/index.js:47:5) 10:46:59 PM: at Object.createLog (/opt/build/repo/node_modules/redux/lib/redux.js:586:12) 10:46:59 PM: at Reporter.error (/opt/build/repo/node_modules/gatsby-cli/lib/reporter/reporter.js:163:23) 10:46:59 PM: at console.error (/opt/build/repo/node_modules/gatsby-cli/lib/reporter/patch-console.js:26:14) 10:46:59 PM: at printErrorAndExit (/opt/build/repo/node_modules/@turist/fetch/dist/sourcemap-register.js:1:7058) 10:46:59 PM: at process.emit (/opt/build/repo/node_modules/@turist/fetch/dist/sourcemap-register.js:1:7292) 10:46:59 PM: at process._fatalException (node:internal/process/execution:167:25) { 10:46:59 PM: code: ‘MODULE_NOT_FOUND’, 10:46:59 PM: requireStack: [ 10:46:59 PM: ‘/opt/build/repo/node_modules/yurnalist/dist/reporters/console/console-reporter.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/yurnalist/dist/index.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby-cli/lib/reporter/loggers/yurnalist/index.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby-cli/lib/reporter/start-logger.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby-cli/lib/reporter/index.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby/dist/schema/resolvers.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby/dist/schema/extensions/index.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby/dist/schema/types/type-defs.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby/dist/redux/reducers/inference-metadata.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby/dist/redux/reducers/index.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby/dist/redux/index.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby/dist/utils/jobs/worker-messaging.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby/dist/utils/worker/child/index.js’, 10:46:59 PM: ‘/opt/build/repo/node_modules/gatsby-worker/dist/child.js’ 10:46:59 PM: ] 10:46:59 PM: }

konstantinmuenster commented 1 year ago

Hey @DarkKxyz! Does the error occur only when deploying on Netlify? Or do you get the same error when you run gatsby build locally?

Based on the error: can you check if you have set the options.blogSettings property (as in here). If not, does it work if you set it?

drqxyzz commented 1 year ago

Ok i tried to redo the site and it works perfectly, thank you! I just want to remove the blog and latest articles, how to so i do not break the site completely?

Edit: Ok i removed the articles for now but how to change them/where? also how to add more blogs?

Im really really new sorry for asking like noob :D

konstantinmuenster commented 1 year ago

I just want to remove the blog and latest articles, how to so i do not break the site completely?

good point. I should make the blog feature optional so that you don't have to specific blogSettings in your options

Ok i removed the articles for now but how to change them/where? also how to add more blogs?

You can add more blog posts by adding more markdown files in the respective content directory

drqxyzz commented 1 year ago

@konstantinmuenster Yeah that would be good if you make it optional. Ohh, thank you i will try to add some blogs. Still can't find how to change latest articles tho

konstantinmuenster commented 1 year ago

Still can't find how to change latest articles tho

You mean the section "Latest Articles"? It uses the blog as well as your Medium posts (if Medium profile is provided) as the data source