Closed ghost closed 3 years ago
You need to adapt your import paths in src\gatsby-theme-try-ghost\templates\post.js
. Have a look at gatsby-theme-ghost-commento to see how this is done. For future communications, please always send me a link to a working test example, so I can better analyze what's going on.
the repo is iNote-xyz, my site is https://inote.xyz, it's still not work
hi, even i shadowing post.js in src\gatsby-theme-try-ghost\templates\post.js,
not change anything in post.js , the starter is not work also . what should i do?
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../components/common' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../components/common' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../components/common/effects' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../components/common/effects' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../components/common/helpers' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../components/common/helpers' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../components/common/meta' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../components/common/meta' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../utils/routing' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../utils/routing' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../utils/use-lang' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../utils/use-lang' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../utils/use-options' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../utils/use-options' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
failed Building development bundle - 8.757s
Hey @xiyizhou: I was going to have a look at iNote-xyz but your Ghost CMS cannot be reached on https://cms.inote.xyz.
thanks for your reply @styxlab , now you can check the repo , the cms , and the gatsby site. i had add the valine , but it still not work . because I am not familiar with English and codes.
I sent you a pull request that should fix the issue. As I initially suspected, you have to adjust the import paths of the shadowing file. The shadowing file must get a proper reference to the original, have a look at the diff. Result looks good on first sight:
now it is work , i learned a lot again at least, very grateful!
You are welcome, cool that it's working now.
now ,useing gatsby-starter-try-ghost , i want to add gatsby-plugin-valine as comment system. the setup is
yarn add gatsby-plugin-valine
<my-project>\src\gatsby-theme-try-ghost\templates
post.js
fromgatsby-theme-try-ghost/packages/gatsby-theme-try-ghost/src/templates/
to<my-project>\src\gatsby-theme-try-ghost\templates
import and add the component to
post.js
` ... import { Comments, TableOfContents, Subscribe } from '../components/common' import Valine from 'gatsby-plugin-valine'
... const Post = ({ data, location, pageContext }) => { const { basePath } = useOptions() ...
`
gatsby develop
error info is ` ERROR #98124 WEBPACKGenerating development JavaScript bundle failed
Can't resolve '../components/common' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../components/common' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../components/common/effects' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../components/common/effects' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../components/common/helpers' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../components/common/helpers' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../components/common/meta' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../components/common/meta' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../utils/routing' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../utils/routing' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../utils/use-lang' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../utils/use-lang' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
ERROR #98124 WEBPACK
Generating development JavaScript bundle failed
Can't resolve '../utils/use-options' in 'C:\inote-xyz\src\gatsby-theme-try-ghost\templates'
If you're trying to use a package make sure that '../utils/use-options' is installed. If you're trying to use a local file make sure that the path is correct.
File: src\gatsby-theme-try-ghost\templates\post.js
failed Building development bundle - 18.386s `