Closed twhite96 closed 6 years ago
@twhite96 I'm able to run gatsby develop
successfully for the repo link you shared.
Steps followed:
yarn
yarn develop
Environment info
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.9.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 70.0.3538.67
Firefox: 62.0.3
Safari: 12.0
npmPackages:
gatsby: ^1.9.164 => 1.9.279
gatsby-link: ^1.6.34 => 1.6.46
gatsby-plugin-catch-links: ^1.0.14 => 1.0.26
gatsby-plugin-feed: ^1.3.15 => 1.3.25
gatsby-plugin-google-analytics: ^1.0.15 => 1.0.31
gatsby-plugin-google-fonts: latest => 0.0.4
gatsby-plugin-offline: ^1.0.12 => 1.0.18
gatsby-plugin-postcss-sass: ^1.0.15 => 1.0.22
gatsby-plugin-react-helmet: ^2.0.3 => 2.0.11
gatsby-plugin-sharp: ^1.6.25 => 1.6.48
gatsby-plugin-sitemap: ^1.2.10 => 1.2.25
gatsby-remark-copy-linked-files: ^1.5.25 => 1.5.37
gatsby-remark-images: ^1.5.37 => 1.5.67
gatsby-remark-prismjs: ^1.2.12 => 1.2.24
gatsby-remark-responsive-iframe: ^1.4.16 => 1.4.20
gatsby-remark-smartypants: ^1.4.10 => 1.4.12
gatsby-source-filesystem: ^1.5.11 => 1.5.39
gatsby-transformer-remark: ^1.7.28 => 1.7.44
gatsby-transformer-sharp: ^1.6.16 => 1.6.27
npmGlobalPackages:
gatsby-cli: 2.4.1
Okay. Will try again.
Actually this is the wrong repo. I didn't add my posts to this repo. Will share that one.
@twhite96 The issue seems to be coming because of the following line in gatsby-node.js
:
// gatsby-node.js Line 116
const tagSlugs = node.frontmatter.tags.map(tag => `/tags/${_.kebabCase(tag)}/`);
The value that you get for node.frontmatter.tags
is not always an array and that's why you are getting this error.
@kakadiadarpan hmmmmm. I'm not sure what you mean. New to Gatsby and I'm using a starter. So is it because the tags in my front matter sometimes use an array and sometimes not?
Ohhhhhhhhh okay I see now. I'll change those posts then. Thanks.
@twhite96 We'll be closing this issue. Feel free to open a new one if you need more help 👍
Description
Getting:
TypeError: node.frontmatter.tags.m ap is not a function
when runninggatsby develop
.Steps to reproduce
Clear steps describing how to reproduce the issue. Please please please link to a demo project if possible, this makes your issue much easier to diagnose (seriously).
Expected result
What should happen? I expected to be able to see my site live in the dev environment but could not.
Actual result
Instead I get the
TypeError: node.frontmatter.tags.m ap is not a function
and the process shuts down. I am using Lumen starter. You can find my repo here.This could really be an issue with my markdown files and the remark transform plugin but I am not sure.
EDIT: More info.
Environment
System: OS: macOS 10.14.1 CPU: x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz Shell: 5.3 - /bin/zsh Binaries: Node: 10.12.0 - ~/.nvm/versions/node/v10.12.0/bin/node Yarn: 1.10.1 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.12.0/bin/npm Browsers: Firefox: 62.0.3 Safari: 12.0.1 npmPackages: gatsby: ^1.9.164 => 1.9.279 gatsby-link: ^1.6.34 => 1.6.46 gatsby-plugin-catch-links: ^1.0.14 => 1.0.26 gatsby-plugin-feed: ^1.3.15 => 1.3.25 gatsby-plugin-google-analytics: ^1.0.15 => 1.0.31 gatsby-plugin-google-fonts: latest => 0.0.4 gatsby-plugin-offline: ^1.0.12 => 1.0.18 gatsby-plugin-postcss-sass: ^1.0.15 => 1.0.22 gatsby-plugin-react-helmet: ^2.0.3 => 2.0.11 gatsby-plugin-sharp: ^1.6.25 => 1.6.48 gatsby-plugin-sitemap: ^1.2.10 => 1.2.25 gatsby-remark-copy-linked-files: ^1.5.25 => 1.5.37 gatsby-remark-images: ^1.5.37 => 1.5.67 gatsby-remark-prismjs: ^1.2.12 => 1.2.24 gatsby-remark-responsive-iframe: ^1.4.16 => 1.4.20 gatsby-remark-smartypants: ^1.4.10 => 1.4.12 gatsby-source-filesystem: ^1.5.11 => 1.5.39 gatsby-transformer-remark: ^1.7.28 => 1.7.44 gatsby-transformer-sharp: ^1.6.16 => 1.6.27