【发布时间】:2022-01-01 15:46:05
【问题描述】:
我正在尝试按照教程进行操作,但我什至在编写一行代码之前就遇到了问题。只有终端命令如下所示:
*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.*
当我转到本地主机时,我会看到一个空白页面(在教程中它显示了视觉效果和一些文本。
当我检查页面时出现错误:
: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
【问题讨论】:
标签: javascript reactjs npm localhost vite