npm installでnpm WARN deprecated
エラー
npm installを行うと下記の警告が表示される
$ npm install npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
解決方法
依存関係の警告なので、それを解決する。
#① $ npm install david -g #② $ david update
$david update
を実行すると下記のメッセージが出ました。
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) Finished. Please run Mix again. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Finished. Please run Mix again.
とあるので、もう一度ビルドする。
$ npm run dev . . . Laravel Mix v6.0.18 ✔ Compiled Successfully in 9707ms ┌─────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┐ │ File │ Size │ ├─────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┤ │ /js/app.js │ 673 KiB │ │ css/app.css │ 3.95 MiB │ └─────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┘
無事ビルドできました。
参考サイト
先人の知恵に感謝です。