スポンサードサーチ
エラー内容
$ yarn create strapi-app my-project --quickstart
yarn create v1.22.10
[1/4] Resolving packages...
warning create-strapi-app > strapi-generate-new > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-strapi-app@3.6.3" with binaries:
- create-strapi-app
[#####################################################################################################################################] 133/133Creating a new Strapi application at /Users/xxxxxx/my-project.
Creating a quickstart project.
Creating files.
Error while installing dependencies:
warning strapi > boom@7.3.0: This module has moved and is now available at @hapi/boom. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
warning strapi > koa-ip > debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
warning strapi > boom > hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
warning strapi > koa-session > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning strapi > strapi-generate-new > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning strapi-admin > @babel/polyfill@7.12.1: This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
warning strapi-admin > html-webpack-plugin@3.2.0: 3.x is no longer supported
warning strapi-admin > webpack-dev-server > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning strapi-admin > webpack-dev-server > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning strapi-admin > @babel/polyfill > core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning strapi-admin > react-intl > @formatjs/intl-unified-numberformat@3.3.7: We have renamed the package to @formatjs/intl-numberformat
warning strapi-admin > react-intl > intl-messageformat-parser@5.5.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
warning strapi-admin > react-intl > intl-messageformat > intl-messageformat-parser@5.5.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
warning strapi-admin > webpack-dev-server > sockjs > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning strapi-admin > webpack-dev-server > webpack-log > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning strapi-admin > reactstrap > react-popper > popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
warning strapi-admin > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning strapi-admin > webpack-dev-server > chokidar > braces > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning strapi-admin > webpack-dev-server > chokidar > braces > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning strapi-plugin-users-permissions > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning strapi-plugin-users-permissions > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning strapi-plugin-users-permissions > request > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning strapi-plugin-users-permissions > request > har-validator@5.1.5: this library is no longer supported
warning strapi-plugin-users-permissions > koa2-ratelimit > sequelize > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning strapi-plugin-email > strapi-provider-email-sendmail > sendmail > mailcomposer@3.12.0: This project is unmaintained
warning strapi-plugin-email > strapi-provider-email-sendmail > sendmail > mailcomposer > buildmail@3.10.0: This project is unmaintained
warning strapi-plugin-upload > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning sqlite3 > node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
warning sqlite3 > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning url-loader@1.1.2: Invalid bin field for "url-loader".
error cli-table3@0.6.0: The engine "node" is incompatible with this module. Expected version "10.* || >= 12.*". Got "11.3.0"
error Found incompatible module.
Keep trying!
Oh, it seems that you encountered errors while installing dependencies in your project.
Don't give up, your project was created correctly.
Fix the issues mentioned in the installation errors and try to run the following command:
cd /Users/xxxxxx/my-project && yarn install
error Command failed.
Exit code: 1
Command: /usr/local/bin/create-strapi-app
Arguments: my-project --quickstart
Directory: /Users/xxxxxx
Output:
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
結論
バージョンはきちんと確認しましょう!!!
Installing from CLIを確認すると、
Nodeは12.X, npmは6.XがMinimum versionとあります。
確認するとバージョンは以下でした。
(gitbookを使っている都合上nodeのバージョンを下げていました)
$ node -v
v11.3.0
$ npm -v
6.4.1
nodeのバージョン変更
nodebrewを入れていたので一覧を確認し、14.16.0を入れていたので切り替えました。
$ nodebrew ls
v11.3.0
v14.16.0
current: v11.3.0
$ nodebrew use 14.16.0
use v14.16.0
$ node -v
v14.16.0
プロジェクト再作成
$ yarn create strapi-app my-project --quickstart
yarn create v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-strapi-app@3.6.3" with binaries:
- create-strapi-app
[#####################################################################################################################################] 133/133Creating a new Strapi application at /Users/xxxxxx/my-project.
Creating a quickstart project.
Creating files.
Dependencies installed successfully.
Your application was created at /Users/xxxxxx/my-project.
Available commands in your project:
yarn develop
Start Strapi in watch mode.
yarn start
Start Strapi without watch mode.
yarn build
Build Strapi admin panel.
yarn strapi
Display all available commands.
You can start by doing:
cd /Users/xxxxxx/my-project
yarn develop
> my-project@0.1.0 build /Users/xxxxxx/my-project
> strapi build "--no-optimization"
Building your admin UI with development configuration ...
Webpack
Compiled successfully in 22.59s
Running your Strapi application.
> my-project@0.1.0 develop /Users/xxxxxx/my-project
> strapi develop
[2021-06-16T09:45:39.665Z] info File created: /Users/xxxxxx/my-project/extensions/users-permissions/config/jwt.js
Project information
┌────────────────────┬──────────────────────────────────────────────────┐
│ Time │ Wed Jun 16 2021 18:45:40 GMT+0900 (日本標準時) │
│ Launched in │ 4006 ms │
│ Environment │ development │
│ Process PID │ 90605 │
│ Version │ 3.6.3 (node v14.16.0) │
│ Edition │ Community │
└────────────────────┴──────────────────────────────────────────────────┘
Actions available
One more thing...
Create your first administrator by going to the administration panel at:
┌─────────────────────────────┐
│ http://localhost:1337/admin │
└─────────────────────────────┘
今度はうまくいきましたとさ。
終了方法
コンソールで Ctr + c
起動方法
作成したプロジェクトの package.json があるディレクトリに移動後下記コマンドを実行。
Quick Start Guideには起動方法が書かれていませんが、
Installing from CLI の Start the project を確認すると下記コマンドが記載されています。
yarnの場合
$ yarn develop
npmの場合
$ npm run develop
オプションに --quickstart
がついている場合は、自動で起動するようなのでQuick Start Guideには起動方法は省略されていた感じでしょうか。
TIP
If you created your application using--quickstart
flag, it will automatically run your application.