Closed inamu108 closed 4 years ago
こちらの問題と同じかもしれないなと思ってます! 以下を参考に対処したらどうなりますかね? https://github.com/cohki0305/sns-app/issues/13#issuecomment-649891402
参考にしたところ解決いたしました。 過去のIssueを一度確認するのを失念しておりまして申し訳ございませんでした。
今後ともよろしくお願いします!
いえいえ!過去のissue確認してもなかなか問題解決するのは難しいので!
①聞きたいことの一行まとめ npm run devを行い、localhostをchromeで見ると画面が黒くなってしまっているので解決したいです。
②起きている問題(起きている現象の詳細/エラーメッセージ/スクリーンショット) npm run devを行い、localhostをchromeで見ると画面が黒くなり、以下のメッセージが表示される。
ERROR in ./.nuxt/client.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: [BABEL] /Users/inamu/vue-projects/sns-app/.nuxt/client.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals' Require stack:
③ソースコード(関連するソースコード/全ソースコード) 下記は、ターミナルでの作業のソースをコピーしました。
inamu@MacBook-Pro sns-app % npm install
SOLINK_MODULE(target) Release/.node CXX(target) Release/obj.target/fse/fsevents.o In file included from ../fsevents.cc:6: In file included from ../../../../nan/nan.h:2884: ../../../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations] data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset; ^ /Users/inamu/Library/Caches/node-gyp/14.5.0/include/node/v8.h:5254:3: note: 'GetContents' has been explicitly marked deprecated here V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.") ^ /Users/inamu/Library/Caches/node-gyp/14.5.0/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'
define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
1 warning generated. SOLINK_MODULE(target) Release/fse.node
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
added 1202 packages from 534 contributors and audited 1202 packages in 16.75s
36 packages are looking for funding run
npm fund
for detailsfound 328 vulnerabilities (324 low, 3 moderate, 1 high) run
npm audit fix
to fix them, ornpm audit
for details inamu@MacBook-Pro sns-app % npm run devWARN No .env file found in /Users/inamu/vue-projects/sns-app. nuxt:dotenv 09:33:20
╭──────────────────────────────────────────╮ │ │ │ Nuxt.js v2.11.0 │ │ Running in development mode (spa) │ │ │ │ Listening on: http://localhost:3000/ │ │ │ ╰──────────────────────────────────────────╯
ℹ Preparing project for development 09:33:21 ℹ Initial build may take a while 09:33:21 ✔ Builder initialized 09:33:21 ✔ Nuxt files generated 09:33:21
✖ Client Compiled with some errors in 1.12s
ERROR Failed to compile with 1 errors friendly-errors 09:33:24
ERROR in ./.nuxt/client.js friendly-errors 09:33:24
Module build failed (from ./node_modules/babel-loader/lib/index.js): friendly-errors 09:33:24 Error: [BABEL] /Users/inamu/vue-projects/sns-app/.nuxt/client.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals' Require stack:
④問題解決するために試したこと(コードもあれば追記) ・zipを再度ダウンロードし、npm install、npm run devを行った。 ・nodeがインストールされていないのかと思い、node -vを行ったがv14.5.0と表示された。
⑤問題について自分なりに考えたこと(デバッグ結果/検索結果/自分なりの原因予想) ・nodeを最新にアップデートする。 ・railsをやっているので、localhost:3000が被っている。 下記のURLを参考にしてみましたが、変わりませんでした。 https://taroken.org/nuxt-npm-run-dev-error/
⑥当該コンテンツを購入したnoteのアカウント https://note.com/inamublog
⑦noteのどのあたりまでやったのか 1-1. 環境構築の、ここまで出来たら環境の立ち上げをやっていきましょう。の動画までです。
以上、よろしくお願い致します。