2021年07月02日
npm install && npm run devでコマンドエラー|Laravel学習
のんびりさんは現在Laravelの勉強しています
渋谷で働くエンジニア福さんのLaravel入門でnpm install && npm run devコマンドを叩いたらたらエラーが出ました
そもそも、npmもはいってなく、Node.jsインストールしなきゃいけないなんて超初心者ののんびりさんにはばっかり。
とりあえず解決できたので、備忘録としてまとめます。
OS:Windows10
PHP:PHP 7.4.20
Laravel:Laravel Framework 8.48.1
MySQL:MySQL Server 8.0 (Ver 8.0.23 for Win64 on x86_64 (MySQL Community Server - GPL))
Node.js:14.17.20
npm:6.14.13
渋谷で働くエンジニア福さんのLaravel入門でnpm install && npm run devコマンドを叩いたらたらエラーが出ました
そもそも、npmもはいってなく、Node.jsインストールしなきゃいけないなんて超初心者ののんびりさんにはばっかり。
とりあえず解決できたので、備忘録としてまとめます。
開発環境
OS:Windows10
PHP:PHP 7.4.20
Laravel:Laravel Framework 8.48.1
MySQL:MySQL Server 8.0 (Ver 8.0.23 for Win64 on x86_64 (MySQL Community Server - GPL))
Node.js:14.17.20
npm:6.14.13
もくじ
- npm install && npm run devコマンドでエラー
- npm installコマンドを再度たたく
- npm run devコマンドを再度たたく
-
no image
-
no image
npm install && npm run devコマンドでエラー
C:\Users\NONBIRI>cd ../../MAMP/htdocs/blog
C:\MAMP\htdocs\blog>npm install && npm run dev
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 querystring@0.2.0: The
npm WARN deprecated 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.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 775 packages from 447 contributors and audited 778 packages in 57.261s
83 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
> @ dev C:\MAMP\htdocs\blog
> npm run development
> @ development C:\MAMP\htdocs\blog
> mix
Additional dependencies must be installed. This will only take a moment.
Running: npm install resolve-url-loader@^4.0.0 --save-dev --legacy-peer-deps
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":"win32","arch":"x64"})
Finished. Please run Mix again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\NONBIRI\AppData\Roaming\npm-cache\_logs\2021-07-02T04_55_39_819Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ 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! C:\Users\NONBIRI\AppData\Roaming\npm-cache\_logs\2021-07-02T04_55_39_880Z-debug.log
C:\MAMP\htdocs\blog>npm install && npm run dev
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 querystring@0.2.0: The
npm WARN deprecated 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.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 775 packages from 447 contributors and audited 778 packages in 57.261s
83 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
> @ dev C:\MAMP\htdocs\blog
> npm run development
> @ development C:\MAMP\htdocs\blog
> mix
Additional dependencies must be installed. This will only take a moment.
Running: npm install resolve-url-loader@^4.0.0 --save-dev --legacy-peer-deps
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":"win32","arch":"x64"})
Finished. Please run Mix again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\NONBIRI\AppData\Roaming\npm-cache\_logs\2021-07-02T04_55_39_819Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ 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! C:\Users\NONBIRI\AppData\Roaming\npm-cache\_logs\2021-07-02T04_55_39_880Z-debug.log
“Finished. Please run Mix again.”という事で、もう一度コマンドを打ってとのメッセージが…
npm installコマンドを再度たたく
C:\MAMP\htdocs\blog>npm install
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":"win32","arch":"x64"})
audited 788 packages in 7.957s
84 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
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":"win32","arch":"x64"})
audited 788 packages in 7.957s
84 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm run devコマンドを再度たたく
C:\MAMP\htdocs\blog>npm run dev
> @ dev C:\MAMP\htdocs\blog
> npm run development
> @ development C:\MAMP\htdocs\blog
> mix
* Mix █████████████████████████ building (10%) 0/2 entries 2/3 dependencies 0/2 modules 2 active
...r ≫ postcss-loader ≫ resolve-url-loader ≫ sass-loader ≫ resources\sass\app.scss
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($spacer, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
302 │ $headings-margin-bottom: $spacer / 2 !default;
│ ^^^^^^^^^^^
╵
node_modules\bootstrap\scss\_variables.scss 302:31 @import
node_modules\bootstrap\scss\bootstrap.scss 9:9 @import
resources\sass\app.scss 8:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($input-padding-y, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
498 │ $input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y / 2) !default;
│ ^^^^^^^^^^^^^^^^^^^^
╵
node_modules\bootstrap\scss\_variables.scss 498:73 @import
node_modules\bootstrap\scss\bootstrap.scss 9:9 @import
resources\sass\app.scss 8:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($custom-control-indicator-size, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
(−−−−途中省略ーーーー)
Laravel Mix v6.0.25
Compiled Successfully in 10492ms
┌──────────────────────────────────────────────────┬──────────┐│ File │ Size │├─────────────────────────────────────────────────┼──────────┤│ /js/app.js │ 2.92 MiB ││ css/app.css │ 178 KiB │└─────────────────────────────────────────────────┴──────────┘webpack compiled successfully
C:\MAMP\htdocs\blog>
> @ dev C:\MAMP\htdocs\blog
> npm run development
> @ development C:\MAMP\htdocs\blog
> mix
* Mix █████████████████████████ building (10%) 0/2 entries 2/3 dependencies 0/2 modules 2 active
...r ≫ postcss-loader ≫ resolve-url-loader ≫ sass-loader ≫ resources\sass\app.scss
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($spacer, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
302 │ $headings-margin-bottom: $spacer / 2 !default;
│ ^^^^^^^^^^^
╵
node_modules\bootstrap\scss\_variables.scss 302:31 @import
node_modules\bootstrap\scss\bootstrap.scss 9:9 @import
resources\sass\app.scss 8:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($input-padding-y, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
498 │ $input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y / 2) !default;
│ ^^^^^^^^^^^^^^^^^^^^
╵
node_modules\bootstrap\scss\_variables.scss 498:73 @import
node_modules\bootstrap\scss\bootstrap.scss 9:9 @import
resources\sass\app.scss 8:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($custom-control-indicator-size, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
(−−−−途中省略ーーーー)
Laravel Mix v6.0.25
Compiled Successfully in 10492ms
┌──────────────────────────────────────────────────┬──────────┐│ File │ Size │├─────────────────────────────────────────────────┼──────────┤│ /js/app.js │ 2.92 MiB ││ css/app.css │ 178 KiB │└─────────────────────────────────────────────────┴──────────┘webpack compiled successfully
C:\MAMP\htdocs\blog>
npm install && npm run devコマンドでエラー後は再度、“npm install”と“npm run dev”で分けてコマンドを打ってみた所、無事コンプリートしました。
npm install && npm run devで一緒に打ってもよかったのか…ちょっと慎重に分けてコマンドを打ったのんびりさんなのでした
出典:渋谷で働くエンジニア福の「実践で学ぶプログラミング入門」
(https://www.youtube.com/channel/UCqzJi2o7bAPtRD3tTFvi7zA)
【このカテゴリーの最新記事】
この記事へのコメント
コメントを書く
この記事へのトラックバックURL
https://fanblogs.jp/tb/10831727
※ブログオーナーが承認したトラックバックのみ表示されます。
この記事へのトラックバック