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

vite启动报错 #6650

Closed
LuckyQ7 opened this issue Jun 25, 2024 · 1 comment
Closed

vite启动报错 #6650

LuckyQ7 opened this issue Jun 25, 2024 · 1 comment
Labels

Comments

@LuckyQ7
Copy link

LuckyQ7 commented Jun 25, 2024

Version of antd-mobile

5.36.1

Operating system and its version

Others

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

vite 5.2.0 + antd-mobile 5.36.1 报错

Relevant log output

Failed to resolve entry for package "rc-field-form". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

    node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1225:21:
      1225 │         let result = await callback({
           ╵                      ^


 This error came from the "onResolve" callback registered here:

    node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1150:20:
      1150 │       let promise = setup({
           ╵                     ^

 The plugin "vite:dep-pre-bundle" was triggered by this import

    node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/antd-mobile/es/components/form/index.js:6:34:
      6 │ import { useWatch, useForm } from 'rc-field-form';~~~~~~~~~~~~~~~


✘ [ERROR] Failed to resolve entry for package "rc-field-form". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

    node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1225:21:
      1225 │         let result = await callback({
           ╵         

 This error came from the "onResolve" callback registered here:

    node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1150:20:
      1150 │       let promise = setup({
           ╵                     ^


 The plugin "vite:dep-pre-bundle" was triggered by this import

    node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/antd-mobile/es/components/form/form-subscribe.js:2:39:
      2 │ import { FieldContext, useWatch } from 'rc-field-form';~~~~~~~~~~~~~~~

✘ [ERROR] Failed to resolve entry for package "rc-field-form". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

    node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1225:21:
      1225 │         let result = await callback({
           ╵                      ^


This error came from the "onResolve" callback registered here:

    node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1150:20:
      1150 │       let promise = setup({
           ╵                     ^


 The plugin "vite:dep-pre-bundle" was triggered by this import

    node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/antd-mobile/es/components/form/form-array.js:2:31:
      2 │ import { List as RCList } from 'rc-field-form';~~~~~~~~~~~~~~~



✘ [ERROR] Failed to resolve entry for package "@rc-component/mini-decimal". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

    node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1225:21:
      1225 │         let result = await callback({
           ╵    

 The plugin "vite:dep-pre-bundle" was triggered by this import

    node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/antd-mobile/es/components/form/form-item.js:5:22:
      5 │ import { Field } from 'rc-field-form';~~~~~~~~~~~~~~~
@LuckyQ7 LuckyQ7 added the bug label Jun 25, 2024
@LuckyQ7 LuckyQ7 changed the title 5.36.1 vite启动报错 Jun 25, 2024
@zombieJ
Copy link
Member

zombieJ commented Jun 25, 2024

看了一下 https://unpkg.alipay.com/browse/[email protected]/package.json 里的配置是对的,换个 yarn 重装试试?或者搜一下 vite 有没有相关的 issue。

@LuckyQ7 LuckyQ7 closed this as completed Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants