Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn dev error #2

Closed
wldst opened this issue Apr 7, 2023 · 2 comments
Closed

yarn dev error #2

wldst opened this issue Apr 7, 2023 · 2 comments

Comments

@wldst
Copy link

wldst commented Apr 7, 2023

(node:7156) UnhandledPromiseRejectionWarning: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:781:11)

@lianginx
Copy link
Owner

lianginx commented Apr 7, 2023

我觉得可能是你的 Node.js 版本过低导致的问题,使用 node -v 查看你的 Node.js 版本:

❯ node -v
v18.0.0

@lianginx
Copy link
Owner

lianginx commented Apr 7, 2023

我觉得可能是你的 Node.js 版本过低导致的问题,使用 node -v 查看你的 Node.js 版本:

❯ node -v
v18.0.0

我的开发环境是 Node 18,测试是没有问题的,你可以尝试升级 Node 版本,看看问题是否会消失。

或许也可以尝试在 nuxt.config.ts 中追加 ssr: false,关闭服务端渲染,昨天我在 dev 分支的开发中也已经关闭了这个配置项。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants