나는 wordpress 웹 사이트 Local by flywheel (url : xyz.local)을 사용하고 있습니다. 나는 gatsby-source-woocommerce를 사용하여 새로운 gatsby 사이트를 만들고 추가했습니다. 또한 우 커머스 설정에서 소비자 키와 소비자 비밀을 생성했습니다. 구성 파일의 api_keys에 추가했습니다.
gastby develop을 실행할 때이 오류가 발생합니다.
========== WARNING FOR FIELD products ===========
The following error status was produced: Error: connect ECONNREFUSED 127.0.0.1:8080
================== END WARNING ==================
08:19:23.204Z > gatsby-source-woocommerce: Fetching 0 nodes for field: products
08:19:23.206Z > gatsby-source-woocommerce: Completed fetching nodes for field: products
warn
========== WARNING FOR FIELD products/categories ===========
The following error status was produced: Error: connect ECONNREFUSED 127.0.0.1:8080
================== END WARNING ==================
08:19:23.213Z > gatsby-source-woocommerce: Fetching 0 nodes for field: products/categories
08:19:23.215Z > gatsby-source-woocommerce: Completed fetching nodes for field: products/categories
warn
========== WARNING FOR FIELD products/attributes ===========
The following error status was produced: Error: connect ECONNREFUSED 127.0.0.1:8080
================== END WARNING ==================
내가 뭔가를 놓친 경우 누군가 pls 말할 수 있습니까? 아니면 내가 한 잘못?
나는 그것을 해결했다. 플러그인에 문제가 있습니다. gatsby-source-woocommerce의 구성 옵션에서 필드 뒤에 모든 내용을 주석 처리합니다. 즉, 주석을 단 후 다음과 같이 표시됩니다.
{
resolve: "@pasdo501/gatsby-source-woocommerce",
options: {
// Base URL of Wordpress site
api: "wordpress.domain",
// set to false to not see verbose output during build
// default: true
verbose: true,
// true if using https. otherwise false.
https: false,
api_keys: {
consumer_key: <key>,
consumer_secret: <secret>,
},
// Array of strings with fields you'd like to create nodes for...
fields: ["products", "products/categories", "products/attributes"],
},
},
@ pasdo501 / gatsby-source-woocommerce 폴더 (node modules)-> gatsby-node.js로 이동하여 api_version = "wc / v3"을 "wc / v2"로 변경하고 wpAPIPrefix = null을 "wp-json"으로 변경하고 저장합니다. 그것.
짜잔
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다