Open zengguanzhong opened 4 years ago
我也遇到了,一样的错误
我也遇到了,一样的错误
暂时别折腾了吧,在官方API出来前bug应该不会再修了。我不是做前端的,代码什么的不太懂,我猜测是因为从notion抓取数据的方式老是因为notion的更新在变,而博主也没有多余的精力随时更新代码,所以可以考虑先放一放。
我也遇到了,一样的错误
暂时别折腾了吧,在官方API出来前bug应该不会再修了。我不是做前端的,代码什么的不太懂,我猜测是因为从notion抓取数据的方式老是因为notion的更新在变,而博主也没有多余的精力随时更新代码,所以可以考虑先放一放。
我也觉得没有官方API,维护这个项目不易。作者的这个项目真的很吸引人,所以想尝试一下,想的“万一成功了呢”
我也遇到了,一样的错误
暂时别折腾了吧,在官方API出来前bug应该不会再修了。我不是做前端的,代码什么的不太懂,我猜测是因为从notion抓取数据的方式老是因为notion的更新在变,而博主也没有多余的精力随时更新代码,所以可以考虑先放一放。
我也觉得没有官方API,维护这个项目不易。作者的这个项目真的很吸引人,所以想尝试一下,想的“万一成功了呢”
成功后记得来关闭这个问题~
我也是一样的失败
这个项目还维护吗
这个项目还维护吗
在notion出官方API前应该不会维护了,博主在github主页有写
好吧
啊这,我也遇到了同样的问题,苦巴巴地只能看不能用
11:31:53 AM: ┌────────────────────────────────────┐
11:31:53 AM: │ 1. build.command from netlify.toml │
11:31:53 AM: └────────────────────────────────────┘
11:31:53 AM:
11:31:53 AM: $ yarn build
11:31:53 AM: yarn run v1.22.4
11:31:54 AM: $ gatsby build
11:31:56 AM: success open and validate gatsby-configs — 0.013
11:31:56 AM: error Must use import to load ES Module: /opt/build/repo/node_modules/notabase/src/notabase.js
11:31:56 AM: require() of ES modules is not supported.
11:31:56 AM: require() of /opt/build/repo/node_modules/notabase/src/notabase.js from /opt/build/repo/node_modules/gatsby-theme-gine-blog/gatsby-node.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
11:31:56 AM: Instead rename notabase.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /opt/build/repo/node_modules/notabase/package.json.
11:31:56 AM: Error in "/opt/build/repo/node_modules/gatsby-theme-gine-blog/gatsby-node.js": Must use import to load ES Module: /opt/build/repo/node_modules/notabase/src/notabase.js
11:31:56 AM: require() of ES modules is not supported.
11:31:56 AM: require() of /opt/build/repo/node_modules/notabase/src/notabase.js from /opt/build/repo/node_modules/gatsby-theme-gine-blog/gatsby-node.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
11:31:56 AM: Instead rename notabase.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /opt/build/repo/node_modules/notabase/package.json.
11:31:56 AM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
11:31:56 AM:
11:31:56 AM:
11:31:56 AM: Error: [ERR_REQUIRE_ESM]: Must use import to load ES Module: /opt/build/repo/n ode_modules/notabase/src/notabase.js
11:31:56 AM: require() of ES modules is not supported.
11:31:56 AM: require() of /opt/build/repo/node_modules/notabase/src/notabase.js from /opt/b uild/repo/node_modules/gatsby-theme-gine-blog/gatsby-node.js is an ES module f ile as it is a .js file whose nearest parent package.json contains "type": "mo dule" which defines all .js files in that package scope as ES modules.
11:31:56 AM: Instead rename notabase.js to end in .cjs, change the requiring code to use im port(), or remove "type": "module" from /opt/build/repo/node_modules/notabase/ package.json.
11:31:56 AM:
11:31:56 AM: - loader.js:1154 Object.Module._extensions..js
11:31:56 AM: internal/modules/cjs/loader.js:1154:13
11:31:56 AM:
11:31:56 AM: - loader.js:986 Module.load
11:31:56 AM: internal/modules/cjs/loader.js:986:32
11:31:56 AM:
11:31:56 AM: - loader.js:879 Function.Module._load
11:31:56 AM: internal/modules/cjs/loader.js:879:14
11:31:56 AM:
11:31:56 AM: - loader.js:1026 Module.require
11:31:56 AM: internal/modules/cjs/loader.js:1026:19
11:31:56 AM:
11:31:56 AM: - v8-compile-cache.js:159 require
11:31:56 AM: [repo]/[v8-compile-cache]/v8-compile-cache.js:159:20
11:31:56 AM:
11:31:56 AM: - gatsby-node.js:2 Object.<anonymous>
11:31:56 AM: [repo]/[gatsby-theme-gine-blog]/gatsby-node.js:2:18
11:31:56 AM:
11:31:56 AM: - v8-compile-cache.js:178 Module._compile
11:31:56 AM: [repo]/[v8-compile-cache]/v8-compile-cache.js:178:30
11:31:56 AM:
11:31:56 AM: - loader.js:1158 Object.Module._extensions..js
11:31:56 AM: internal/modules/cjs/loader.js:1158:10
11:31:56 AM:
11:31:56 AM: - loader.js:986 Module.load
11:31:56 AM: internal/modules/cjs/loader.js:986:32
11:31:56 AM:
11:31:56 AM: - loader.js:879 Function.Module._load
11:31:56 AM: internal/modules/cjs/loader.js:879:14
11:31:56 AM:
11:31:56 AM: - loader.js:1026 Module.require
11:31:56 AM: internal/modules/cjs/loader.js:1026:19
11:31:56 AM:
11:31:56 AM: - v8-compile-cache.js:159 require
11:31:56 AM: [repo]/[v8-compile-cache]/v8-compile-cache.js:159:20
11:31:56 AM:
11:31:56 AM: - resolve-module-exports.js:126 module.exports
11:31:56 AM: [repo]/[gatsby]/dist/bootstrap/resolve-module-exports.js:126:26
11:31:56 AM:
11:31:56 AM: - validate.js:114
11:31:56 AM: [repo]/[gatsby]/dist/bootstrap/load-plugins/validate.js:114:31
11:31:56 AM:
11:31:56 AM: - Array.forEach
11:31:56 AM:
11:31:56 AM: - validate.js:107 collatePluginAPIs
11:31:56 AM: [repo]/[gatsby]/dist/bootstrap/load-plugins/validate.js:107:20
11:31:56 AM:
11:31:56 AM:
11:31:56 AM: error Command failed with exit code 1.
11:31:56 AM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
11:31:56 AM:
11:31:56 AM: ┌─────────────────────────────┐
11:31:56 AM: │ "build.command" failed │
11:31:56 AM: └─────────────────────────────┘
11:31:56 AM:
11:31:56 AM: Error message
11:31:56 AM: Command failed with exit code 1: yarn build
11:31:56 AM:
11:31:56 AM: Error location
11:31:56 AM: In build.command from netlify.toml:
11:31:56 AM: yarn build
11:31:56 AM:
11:31:56 AM: Resolved config
11:31:56 AM: build:
11:31:56 AM: command: yarn build
11:31:56 AM: commandOrigin: config
11:31:56 AM: functions: /opt/build/repo/functions
11:31:56 AM: publish: /opt/build/repo/public
我也遇到了这个问题,之前搭建的那个是没有的
根据中文文档的“快速体验”中,使用Netlify App部署失败。
Deploy log如下: 5:00:44 PM: Build ready to start 5:00:51 PM: build-image version: 3031d4c9e432fd7016f6279fc9ad706f9205d845 5:00:51 PM: build-image tag: v3.3.17 5:00:51 PM: buildbot version: 1f35b3abd6e2bf5230d8edf68072840fdec1513f 5:00:52 PM: Fetching cached dependencies 5:00:52 PM: Failed to fetch cache, continuing with build 5:00:52 PM: Starting to prepare the repo for build 5:00:52 PM: No cached dependencies found. Cloning fresh repo 5:00:52 PM: git clone https://github.com/mayneyao/gatsby-starter-gine-blog 5:00:53 PM: Preparing Git Reference refs/heads/master 5:00:54 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'functions' versus '' in the Netlify UI 5:00:54 PM: Starting build script 5:00:54 PM: Installing dependencies 5:00:54 PM: Python version set to 2.7 5:00:56 PM: v12.18.0 is already installed. 5:00:57 PM: Now using node v12.18.0 (npm v6.14.4) 5:00:57 PM: Started restoring cached build plugins 5:00:57 PM: Finished restoring cached build plugins 5:00:57 PM: Attempting ruby version 2.7.1, read from environment 5:00:59 PM: Using ruby version 2.7.1 5:00:59 PM: Using PHP version 5.6 5:00:59 PM: 5.2 is already installed. 5:00:59 PM: Using Swift version 5.2 5:00:59 PM: Started restoring cached node modules 5:00:59 PM: Finished restoring cached node modules 5:00:59 PM: Started restoring cached yarn cache 5:00:59 PM: Finished restoring cached yarn cache 5:00:59 PM: Installing yarn at version 1.22.4 5:00:59 PM: Installing Yarn! 5:00:59 PM: > Downloading tarball... 5:00:59 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.OLNnNHNgvB 5:00:59 PM: % Total % Received % Xferd Average Speed Time Time Time Current 5:00:59 PM: Dload Upload Total Spent Left Speed 5:00:59 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 5:00:59 PM: 100 80 100 80 0 0 278 0 --:--:-- --:--:-- --:--:-- 278 5:01:00 PM: 100 93 100 93 0 0 154 0 --:--:-- --:--:-- --:--:-- 154 5:01:00 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 5:01:00 PM: 100 630 100 630 0 0 725 0 --:--:-- --:--:-- --:--:-- 12115 5:01:00 PM: 100 1215k 100 1215k 0 0 930k 0 0:00:01 0:00:01 --:--:-- 930k 5:01:00 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.OLNnNHNgvB.asc 5:01:00 PM: 100 84 100 84 0 0 3043 0 --:--:-- --:--:-- --:--:-- 3043 5:01:00 PM: 100 97 100 97 0 0 1691 0 --:--:-- --:--:-- --:--:-- 1691 5:01:00 PM: 100 634 100 634 0 0 7086 0 --:--:-- --:--:-- --:--:-- 7086 5:01:00 PM: 100 1028 100 1028 0 0 8084 0 --:--:-- --:--:-- --:--:-- 8084 5:01:01 PM: > Verifying integrity... 5:01:01 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA 5:01:01 PM: gpg: Good signature from "Yarn Packaging yarn@dan.cx" 5:01:01 PM: gpg: WARNING: This key is not certified with a trusted signature! 5:01:01 PM: gpg: There is no indication that the signature belongs to the owner. 5:01:01 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 5:01:01 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA 5:01:01 PM: > GPG signature looks good 5:01:01 PM: > Extracting to ~/.yarn... 5:01:01 PM: > Adding to $PATH... 5:01:01 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the
5:02:08 PM: [repo]/[gatsby-theme-gine-blog]/gatsby-node.js:2:18
5:02:08 PM:
yarn
command will now be available. 5:01:02 PM: Installing NPM modules using Yarn version 1.22.4 5:01:02 PM: yarn install v1.22.4 5:01:02 PM: [1/4] Resolving packages... 5:01:05 PM: [2/4] Fetching packages... 5:01:05 PM: warning Pattern ["jss@latest"] is trying to unpack in the same destination "/opt/build/.yarn_cache/v6/npm-jss-9.8.7-ed9763fc0f2f0260fc8260dac657af61e622ce05-integrity/node_modules/jss" as pattern ["jss@^9.8.7","jss@^9.7.0"]. This could result in non-deterministic behavior, skipping. 5:01:05 PM: warning Pattern ["prop-types@latest"] is trying to unpack in the same destination "/opt/build/.yarn_cache/v6/npm-prop-types-15.7.2-52c41e75b8c87e72b9d9360e0206b99dcbffa6c5-integrity/node_modules/prop-types" as pattern ["prop-types@^15.7.2","prop-types@^15.6.1","prop-types@^15.7.2","prop-types@^15.7.2","prop-types@^15.6.1","prop-types@^15.6.2","prop-types@^15.6.2","prop-types@^15.5.10","prop-types@^15.6.2","prop-types@^15.6.0","prop-types@^15.6.0","prop-types@^15.7.2","prop-types@^15.6.2","prop-types@^15.5.4","prop-types@^15.6.0","prop-types@^15.6.0","prop-types@^15.6.0","prop-types@^15.6.0","prop-types@^15.6.2","prop-types@^15.7.2","prop-types@^15.5.10","prop-types@^15.5.8","prop-types@^15.5.8"]. This could result in non-deterministic behavior, skipping. 5:01:10 PM: warning url-loader@1.1.2: Invalid bin field for "url-loader". 5:01:38 PM: info fsevents@2.0.7: The platform "linux" is incompatible with this module. 5:01:38 PM: info "fsevents@2.0.7" is an optional dependency and failed compatibility check. Excluding it from installation. 5:01:38 PM: info fsevents@1.2.9: The platform "linux" is incompatible with this module. 5:01:38 PM: info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation. 5:01:38 PM: [3/4] Linking dependencies... 5:01:38 PM: warning "gatsby > eslint-config-react-app@4.0.1" has incorrect peer dependency "eslint-plugin-flowtype@2.x". 5:01:38 PM: warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". 5:01:38 PM: warning "gatsby-theme-gine-blog > react-images > react-scrolllock@1.0.9" has incorrect peer dependency "react@^0.14 || ^15.0". 5:01:53 PM: [4/4] Building fresh packages... 5:02:03 PM: success Saved lockfile. 5:02:03 PM: Done in 60.62s. 5:02:03 PM: NPM modules installed using Yarn 5:02:03 PM: Started restoring cached go cache 5:02:03 PM: Finished restoring cached go cache 5:02:03 PM: go version go1.14.4 linux/amd64 5:02:03 PM: go version go1.14.4 linux/amd64 5:02:03 PM: Installing missing commands 5:02:03 PM: Verify run directory 5:02:04 PM: 5:02:04 PM: ┌─────────────────────────────┐ 5:02:04 PM: │ Netlify Build │ 5:02:04 PM: └─────────────────────────────┘ 5:02:04 PM: 5:02:04 PM: ❯ Version 5:02:04 PM: @netlify/build 2.0.10 5:02:04 PM: 5:02:04 PM: ❯ Flags 5:02:04 PM: deployId: 5ef3163b842590ddab56f35d 5:02:04 PM: mode: buildbot 5:02:04 PM: 5:02:04 PM: ❯ Current directory 5:02:04 PM: /opt/build/repo 5:02:04 PM: 5:02:04 PM: ❯ Config file 5:02:04 PM: /opt/build/repo/netlify.toml 5:02:04 PM: 5:02:04 PM: ❯ Context 5:02:04 PM: production 5:02:05 PM: 5:02:05 PM: ┌────────────────────────────────────┐ 5:02:05 PM: │ 1. build.command from netlify.toml │ 5:02:05 PM: └────────────────────────────────────┘ 5:02:05 PM: 5:02:05 PM: $ yarn build 5:02:06 PM: yarn run v1.22.4 5:02:06 PM: $ gatsby build 5:02:08 PM: success open and validate gatsby-configs — 0.015 5:02:08 PM: error Must use import to load ES Module: /opt/build/repo/node_modules/notabase/src/notabase.js 5:02:08 PM: require() of ES modules is not supported. 5:02:08 PM: require() of /opt/build/repo/node_modules/notabase/src/notabase.js from /opt/build/repo/node_modules/gatsby-theme-gine-blog/gatsby-node.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. 5:02:08 PM: Instead rename notabase.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /opt/build/repo/node_modules/notabase/package.json. 5:02:08 PM: Error in "/opt/build/repo/node_modules/gatsby-theme-gine-blog/gatsby-node.js": Must use import to load ES Module: /opt/build/repo/node_modules/notabase/src/notabase.js 5:02:08 PM: require() of ES modules is not supported. 5:02:08 PM: require() of /opt/build/repo/node_modules/notabase/src/notabase.js from /opt/build/repo/node_modules/gatsby-theme-gine-blog/gatsby-node.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. 5:02:08 PM: Instead rename notabase.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /opt/build/repo/node_modules/notabase/package.json. 5:02:08 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to 5:02:08 PM: 5:02:08 PM: 5:02:08 PM: Error: [ERR_REQUIRE_ESM]: Must use import to load ES Module: /opt/build/repo/n ode_modules/notabase/src/notabase.js 5:02:08 PM: require() of ES modules is not supported. 5:02:08 PM: require() of /opt/build/repo/node_modules/notabase/src/notabase.js from /opt/b uild/repo/node_modules/gatsby-theme-gine-blog/gatsby-node.js is an ES module f ile as it is a .js file whose nearest parent package.json contains "type": "mo dule" which defines all .js files in that package scope as ES modules. 5:02:08 PM: Instead rename notabase.js to end in .cjs, change the requiring code to use im port(), or remove "type": "module" from /opt/build/repo/node_modules/notabase/ package.json. 5:02:08 PM:5:02:08 PM: - loader.js:1154 Object.Module._extensions..js 5:02:08 PM: internal/modules/cjs/loader.js:1154:13 5:02:08 PM:
5:02:08 PM: - loader.js:986 Module.load 5:02:08 PM: internal/modules/cjs/loader.js:986:32 5:02:08 PM:
5:02:08 PM: - loader.js:879 Function.Module._load 5:02:08 PM: internal/modules/cjs/loader.js:879:14 5:02:08 PM:
5:02:08 PM: - loader.js:1026 Module.require 5:02:08 PM: internal/modules/cjs/loader.js:1026:19 5:02:08 PM:
5:02:08 PM: - v8-compile-cache.js:159 require 5:02:08 PM: [repo]/[v8-compile-cache]/v8-compile-cache.js:159:20 5:02:08 PM:
5:02:08 PM: - gatsby-node.js:2 Object.
5:02:08 PM: - v8-compile-cache.js:178 Module._compile 5:02:08 PM: [repo]/[v8-compile-cache]/v8-compile-cache.js:178:30 5:02:08 PM:
5:02:08 PM: - loader.js:1158 Object.Module._extensions..js 5:02:08 PM: internal/modules/cjs/loader.js:1158:10 5:02:08 PM:
5:02:08 PM: - loader.js:986 Module.load 5:02:08 PM: internal/modules/cjs/loader.js:986:32 5:02:08 PM:
5:02:08 PM: - loader.js:879 Function.Module._load 5:02:08 PM: internal/modules/cjs/loader.js:879:14 5:02:08 PM:
5:02:08 PM: - loader.js:1026 Module.require 5:02:08 PM: internal/modules/cjs/loader.js:1026:19 5:02:08 PM:
5:02:08 PM: - v8-compile-cache.js:159 require 5:02:08 PM: [repo]/[v8-compile-cache]/v8-compile-cache.js:159:20 5:02:08 PM:
5:02:08 PM: - resolve-module-exports.js:126 module.exports 5:02:08 PM: [repo]/[gatsby]/dist/bootstrap/resolve-module-exports.js:126:26 5:02:08 PM:
5:02:08 PM: - validate.js:114 5:02:08 PM: [repo]/[gatsby]/dist/bootstrap/load-plugins/validate.js:114:31 5:02:08 PM:
5:02:08 PM: - Array.forEach 5:02:08 PM:
5:02:08 PM: - validate.js:107 collatePluginAPIs 5:02:08 PM: [repo]/[gatsby]/dist/bootstrap/load-plugins/validate.js:107:20 5:02:08 PM:
5:02:08 PM: 5:02:09 PM: error Command failed with exit code 1. 5:02:09 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 5:02:09 PM: 5:02:09 PM: ┌─────────────────────────────┐ 5:02:09 PM: │ "build.command" failed │ 5:02:09 PM: └─────────────────────────────┘ 5:02:09 PM: 5:02:09 PM: Error message 5:02:09 PM: Command failed with exit code 1: yarn build 5:02:09 PM: 5:02:09 PM: Error location 5:02:09 PM: In build.command from netlify.toml: 5:02:09 PM: yarn build 5:02:09 PM: 5:02:09 PM: Resolved config 5:02:09 PM: build: 5:02:09 PM: command: yarn build 5:02:09 PM: functions: /opt/build/repo/functions 5:02:09 PM: publish: /opt/build/repo/public 5:02:09 PM: headers: 5:02:09 PM: - for: '.js' 5:02:09 PM: values: 5:02:09 PM: Cache-Control: 'public, max-age=31536000,immutable' 5:02:09 PM: - for: /sw.js 5:02:09 PM: values: 5:02:09 PM: Cache-Control: 'public, max-age=0, must-revalidate' 5:02:09 PM: - for: '.css' 5:02:09 PM: values: 5:02:09 PM: Cache-Control: 'public, max-age=31536000,immutable' 5:02:09 PM: - for: '.jpg' 5:02:09 PM: values: 5:02:09 PM: Cache-Control: 'public, max-age=31536000,immutable' 5:02:09 PM: - for: '.png' 5:02:09 PM: values: 5:02:09 PM: Cache-Control: 'public, max-age=31536000,immutable' 5:02:09 PM: Caching artifacts 5:02:09 PM: Started saving node modules 5:02:09 PM: Finished saving node modules 5:02:09 PM: Started saving build plugins 5:02:09 PM: Finished saving build plugins 5:02:09 PM: Started saving yarn cache 5:02:09 PM: Finished saving yarn cache 5:02:09 PM: Started saving pip cache 5:02:16 PM: Finished saving pip cache 5:02:16 PM: Started saving emacs cask dependencies 5:02:16 PM: Finished saving emacs cask dependencies 5:02:16 PM: Started saving maven dependencies 5:02:16 PM: Finished saving maven dependencies 5:02:16 PM: Started saving boot dependencies 5:02:16 PM: Finished saving boot dependencies 5:02:16 PM: Started saving go dependencies 5:02:16 PM: Finished saving go dependencies 5:02:19 PM: Error running command: Build script returned non-zero exit code: 1 5:02:19 PM: Failing build: Failed to build site 5:02:19 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1 5:02:19 PM: Finished processing build request in 1m28.112324261s