https://www.gatsbyjs.org/tutorial/part-zero/
我目前正在关注本教程。我已经成功安装了gatsby,并且正在使用最新版本的npm和node。 但是,每次我尝试使用任何gatsby命令时,都会得到“-bash:gatsby:命令未找到”
这是安装的样子。我正在使用“ sudo npm i -g gatsby-cli” *
安装/Users/isabellecharafeddine/.npm-global/bin/gatsby -> /Users/isabellecharafeddine/.npm-global/lib/node_modules/gatsby-cli/lib/index.js
> gatsby-cli@2.8.22 postinstall /Users/isabellecharafeddine/.npm-global/lib/node_modules/gatsby-cli
> node scripts/postinstall.js
Success!
Welcome to the Gatsby CLI! Please visit https://www.gatsbyjs.org/docs/gatsby-cli/ for more information.
Usage: gatsby <command> [options]
Commands:
gatsby develop Start development server. Watches files, rebuilds,
and hot reloads if something changes
gatsby build Build a Gatsby project.
gatsby serve Serve previously built Gatsby site.
gatsby info Get environment information for debugging and issue
reporting
gatsby clean Wipe the local gatsby environment including built
assets and cache
gatsby repl Get a node repl with context of Gatsby environment,
see (https://www.gatsbyjs.org/docs/gatsby-repl/)
gatsby new [rootPath] [starter] Create new Gatsby project.
gatsby plugin Useful commands relating to Gatsby plugins
gatsby telemetry Enable or disable Gatsby anonymous analytics
collection.
Options:
--verbose Turn on verbose output [boolean] [default: false]
--no-color, --no-colors Turn off the color in output [boolean] [default: false]
--json Turn on the JSON logger [boolean] [default: false]
-h, --help Show help [boolean]
-v, --version Show the version of the Gatsby CLI and the Gatsby package
in the current project [boolean]
npm WARN ink@2.6.0 requires a peer of @types/react@>=16.8.0 but none is installed. You must install peer dependencies yourself.
+ gatsby-cli@2.8.22
updated 1 package in 7.55s