question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong wite NuxtJs(3.0.0 RC1)

See original GitHub issue

This function solves the problem (这个功能解决的问题)

各种方式引入nuxtjs(3.0.0 RC1)失败,全局,按需,手动,都报各种错误,导致vite预建模块速度极慢,然后报错,这是手动引入的一个错误: (node:13776) Warning: To load an ES module, set “type”: “module” in the package.json or use the .mjs extension. (Use node --trace-warnings ... to show where the warning was created) D:\NodeJsWS\my-nuxt3-app\node_modules\vueuc\es\shared\finweck-tree.js:4 export class FinweckTree { ^^^^^^

SyntaxError: Unexpected token ‘export’ at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1032:15) at Module._compile (node:internal/modules/cjs/loader:1067:27) at Object.Module._extensions…js (node:internal/modules/cjs/loader:1155:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:168:29) at ModuleJob.run (node:internal/modules/esm/module_job:195:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:337:24)

Expected API (期望的 API)

适配nuxtjs(3.0.0 RC1)的按需引入方式。

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
cinobcommented, Apr 27, 2022

vueuc@0.4.32引入@juggle/resize-observerESM问题导致的

参考nuxt3官方文档ES Modules

transpile中额外加入@juggle/resize-observer

build: {
   transpile: ['vueuc', 'naive-ui', '@juggle/resize-observer'],
}
1reaction
07akionicommented, May 18, 2022

@07akioni hey, does it work with Nuxt 3 RC1?

It works now.

See https://www.naiveui.com/en-US/os-theme/docs/ssr

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong wite NuxtJs(3.0.0 RC1) #2851 - GitHub
This function solves the problem (这个功能解决的问题) 各种方式引入nuxtjs(3.0.0 RC1)失败,全局,按需,手动,都报各种错误,导致vite预建模块 ...
Read more >
Updating to Nuxt3 RC3 produces client side errors
I got the help I needed on nuxt's github discussion page. As nuxt moved to RC, the package to be used had changed....
Read more >
Releases - nuxt auth docs
Any unhandled error will be caught now. This helps to prevent application crashing with auth module. (b58ca17); resetOnError is set to false by...
Read more >
Secure and Easy Axios integration with Nuxt.js.
You can also disable progress bar per request using progress config. this.$axios.$get('URL', { progress: false }) ...
Read more >
How to create Nuxt 3 404 error page?! - Reddit
Works in Nuxt 3.0.0-rc.1. Upvote 3. Downvote. Reply. u/naaadz avatar ... With an error.vue template at the root of your project. :).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found