老实说,这在任何开发环境中都没有发生过我的节点版本:12.14.1 我的 npm 版本:6.13.4
我正在使用 Sanity.io 作为 CRM 构建 Gatsby 站点,但出现此错误:
ahinds$ npm run dev
> sanity-gatsby-blog@1.0.7 dev /Users/ahinds/Desktop/AHinds/dev/LMPropertyMgmt
> lerna run dev --parallel
lerna notice cli v3.20.2
lerna info Executing command in 2 packages: "npm run dev"
sanity-gatsby-blog-web: npm WARN npm npm does not support Node.js v12.14.1
sanity-gatsby-blog-web: npm WARN npm You should probably upgrade to a newer version of node as we
sanity-gatsby-blog-web: npm WARN npm can't make any promises that npm will work with this version.
sanity-gatsby-blog-web: npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10.
sanity-gatsby-blog-web: npm WARN npm You can find the latest version at https://nodejs.org/
sanity-gatsby-blog-studio: npm WARN npm npm does not support Node.js v12.14.1
sanity-gatsby-blog-studio: npm WARN npm You should probably upgrade to a newer version of node as we
sanity-gatsby-blog-studio: npm WARN npm can't make any promises that npm will work with this version.
sanity-gatsby-blog-studio: npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10.
sanity-gatsby-blog-studio: npm WARN npm You can find the latest version at https://nodejs.org/
sanity-gatsby-blog-web: > sanity-gatsby-blog-web@1.0.1 dev /Users/ahinds/Desktop/AHinds/dev/LMPropertyMgmt/web
sanity-gatsby-blog-web: > npm run clean-cache && gatsby develop
sanity-gatsby-blog-studio: > sanity-gatsby-blog-studio@1.0.5 dev /Users/ahinds/Desktop/AHinds/dev/LMPropertyMgmt/studio
sanity-gatsby-blog-studio: > sanity start
sanity-gatsby-blog-web: npm WARN npm npm does not support Node.js v12.14.1
sanity-gatsby-blog-web: npm WARN npm You should probably upgrade to a newer version of node as we
sanity-gatsby-blog-web: npm WARN npm can't make any promises that npm will work with this version.
sanity-gatsby-blog-web: npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10.
sanity-gatsby-blog-web: npm WARN npm You can find the latest version at https://nodejs.org/
sanity-gatsby-blog-studio: Error occured trying to resolve project root:
sanity-gatsby-blog-studio: Unexpected token ] in JSON at position 425
sanity-gatsby-blog-studio: npm ERR! code ELIFECYCLE
sanity-gatsby-blog-studio: npm ERR! errno 1
sanity-gatsby-blog-studio: npm ERR! sanity-gatsby-blog-studio@1.0.5 dev: `sanity start`
sanity-gatsby-blog-studio: npm ERR! Exit status 1
sanity-gatsby-blog-studio: npm ERR!
sanity-gatsby-blog-studio: npm ERR! Failed at the sanity-gatsby-blog-studio@1.0.5 dev script.
sanity-gatsby-blog-studio: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
sanity-gatsby-blog-web: > sanity-gatsby-blog-web@1.0.1 clean-cache /Users/ahinds/Desktop/AHinds/dev/LMPropertyMgmt/web
sanity-gatsby-blog-web: > gatsby clean
sanity-gatsby-blog-studio: npm ERR! A complete log of this run can be found in:
sanity-gatsby-blog-studio: npm ERR! /Users/ahinds/.npm/_logs/2020-02-14T21_27_42_015Z-debug.log
lerna ERR! npm run dev exited 1 in 'sanity-gatsby-blog-studio'
lerna ERR! npm run dev stdout:
> sanity-gatsby-blog-studio@1.0.5 dev /Users/ahinds/Desktop/AHinds/dev/LMPropertyMgmt/studio
> sanity start
lerna ERR! npm run dev stderr:
npm WARN npm npm does not support Node.js v12.14.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10.
npm WARN npm You can find the latest version at https://nodejs.org/
Error occured trying to resolve project root:
Unexpected token ] in JSON at position 425
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sanity-gatsby-blog-studio@1.0.5 dev: `sanity start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sanity-gatsby-blog-studio@1.0.5 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ahinds/.npm/_logs/2020-02-14T21_27_42_015Z-debug.log
lerna ERR! npm run dev exited 1 in 'sanity-gatsby-blog-studio'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sanity-gatsby-blog@1.0.7 dev: `lerna run dev --parallel`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sanity-gatsby-blog@1.0.7 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ahinds/.npm/_logs/2020-02-14T21_27_42_097Z-debug.log
知道为什么这个版本的节点不能与这个版本的 npm 一起工作吗?我从 NOde.js 网站安装了它们,所以它们被打包在一起。
这是我的回购