[英]POST http://localhost:3000/upload 500 (Internal Server Error)
[英]Why does my localhost:3000 not work (error 500)
我正在嘗試按照教程進行操作,但在編寫一行代碼之前就遇到了問題。 只有終端命令如下所示:
*PS C:\Users\ruben\OneDrive\Bureaublad\dapp> cd .\client\
PS C:\Users\ruben\OneDrive\Bureaublad\dapp\client> npm init vite@latest
√ Project name: ... ./
√ Select a framework: » react
√ Select a variant: » react
Scaffolding project in C:\Users\ruben\OneDrive\Bureaublad\dapp\client\...
Done. Now run:
npm install
npm run dev
PS C:\Users\ruben\OneDrive\Bureaublad\dapp\client> npm install
added 76 packages, and audited 77 packages in 6s
7 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
PS C:\Users\ruben\OneDrive\Bureaublad\dapp\client> npm run dev
> dapp1@0.0.0 dev
> vite
Pre-bundling dependencies:
react
react-dom
react/jsx-dev-runtime
(this will be run only when your dependencies or config have changed)
vite v2.7.10 dev server running at:
> Local: http://localhost:3000/
> Network: use `--host` to expose
ready in 467ms.*
當我 go 到本地主機時,我得到一個空白頁面(在教程中它顯示了視覺和一些文本。
當我檢查頁面時,出現錯誤:
:3000/:1
GET http://localhost:3000/ 500 (Internal Server Error)
localhost/:1
GET http://localhost:3000/_next/static/chunks/fallback/webpack.js?ts=1641050312655
net::ERR_ABORTED 500 (Internal Server Error)
localhost/:1
GET http://localhost:3000/_next/static/chunks/fallback/main.js?ts=1641050312655
net::ERR_ABORTED 500 (Internal Server Error)
localhost/:1
GET http://localhost:3000/_next/static/chunks/fallback/react-refresh.js?
ts=1641050312655 net::ERR_ABORTED 500 (Internal Server Error)
localhost/:1
GET http://localhost:3000/_next/static/chunks/fallback/pages/_app.js?
ts=1641050312655 net::ERR_ABORTED 500 (Internal Server Error)
localhost/:1
GET http://localhost:3000/_next/static/chunks/fallback/pages/_error.js?
ts=1641050312655 net::ERR_ABORTED 500 (Internal Server Error)
和這個問題一樣:
頁面或腳本正在訪問 navigator.userAgent、navigator.appVersion 和 navigator.platform 中的至少一個。 從 Chrome 101 開始,用戶代理字符串中可用的信息量將減少。 要解決此問題,請將 navigator.userAgent、navigator.appVersion 和 navigator.platform 的使用替換為特征檢測、漸進增強或遷移到 navigator.userAgentData。 請注意,出於性能原因,僅顯示對其中一個屬性的第一次訪問。 1 來源bubble_compiled.js:1
確保您至少使用了 npm v6 我剛剛在節點 v17 上嘗試過,它在 npm v7 上運行良好。 我遵循的文檔在這里
這可能是權限問題。 您正在 OneDrive 文件夾中工作。 因此,OneDrive 很可能會不斷監視內部文件夾中的每一個變化,並阻止其他應用程序的訪問。 嘗試在另一個文件夾中重新啟動您的項目。 最好在“C:\Users\ruben\Desktop”中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.