githubからダウンロードしたwebアプリを開発環境で実行したいのですが、ブラウザが真っ白になってしまい何も描画されません。
・githubからclone後、package-lock.json、node_modulesを削除の上、プロジェクトフォルダ内でyarnをインストール。buildの上、yarn run start
で実行すると、コード内の変数についてwarningが出る(defined but never used)が、エラーはなく、localhost::3000が開くものの、真っ白という状態。
・index.js内のBrowserRouter
をHasuRouter
にしてみるー>効果なし
・package.jsonに"homepage": "."
,を追加ー>効果なし。"homepage": "./"
,でも同様。そもそもgithubからダウンロードした時にはhomepageの項目はなかったので、なくても作用していた模様。
・set NODE_ENV = development
を実行済み。
・npm start
でも同様の現象。
・yarn 1.22.15
・MacOS12.3.1
不足している情報があれば可能な限り補足させていただきます。
ご意見いただけましたら幸いです。何卒よろしくお願い申し上げます。
[追記]
package-lock.jsonはgithub内でもともと提供されていたので、それを入れたままnpm startを試みましたが、下記のようなコメントが出て実行できませんでした。やはり一度消さないとダメなようです。
To fix the dependency tree, try following the steps below in the exact order: 1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder. 2. Delete node_modules in your project folder. 3. Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder. 4. Run npm install or yarn, depending on the package manager you use.
あなたの回答
tips
プレビュー