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

fix: A type error Cannot find module 'rollup/parseAst' or its corresponding type declarations. occurs in sample code #237

Closed
madogiwa0124 opened this issue Jan 8, 2024 · 1 comment · Fixed by #242

Comments

@madogiwa0124
Copy link
Contributor

As shown below, a type error TS2307 occurs in vite@5.0.10 .

$ cd book/impls/10_minimum_example/070_sfc_compiler2
$ pnpm install
$ pnpm tsc --noEmit

../../../../node_modules/.pnpm/vite@5.0.10_@types+node@20.10.5/node_modules/vite/dist/node/index.d.ts:6:41 - error TS2307: Cannot find module 'rollup/parseAst' or its corresponding type declarations.

6 export { parseAst, parseAstAsync } from 'rollup/parseAst';
                                          ~~~~~~~~~~~~~~~~~


Found 1 error in ../../../../node_modules/.pnpm/vite@5.0.10_@types+node@20.10.5/node_modules/vite/dist/node/index.d.ts:6

I have confirmed that the following diffs will resolve the issue in my local.

book/impls/10_minimum_example/070_sfc_compiler2/tsconfig.json

-   "moduleResolution": "node",
+   "moduleResolution": "bundler",

Code that causes an error other than the above

  • book/impls/10_minimum_example/070_sfc_compiler2
  • book/impls/10_minimum_example/070_sfc_compiler3
  • book/impls/10_minimum_example/070_sfc_compiler4
  • book/impls/20_basic_virtual_dom/010_patch_keyed_children
  • book/impls/20_basic_virtual_dom/020_bit_flags
  • book/impls/20_basic_virtual_dom/040_scheduler
  • book/impls/20_basic_virtual_dom/050_next_tick
  • book/impls/20_basic_virtual_dom/060_other_props
  • book/impls/30_basic_reactivity_system/010_ref
  • book/impls/30_basic_reactivity_system/020_shallow_ref
  • book/impls/30_basic_reactivity_system/030_to_ref
  • book/impls/30_basic_reactivity_system/040_to_refs
  • book/impls/30_basic_reactivity_system/050_computed
  • book/impls/30_basic_reactivity_system/060_computed_setter
  • book/impls/30_basic_reactivity_system/070_watch
  • book/impls/30_basic_reactivity_system/080_watch_api_extends
  • book/impls/30_basic_reactivity_system/090_watch_effect
  • book/impls/30_basic_reactivity_system/100_reactive_proxy_target_type
  • book/impls/30_basic_reactivity_system/110_template_refs
  • book/impls/30_basic_reactivity_system/130_cleanup_effects
  • book/impls/30_basic_reactivity_system/140_effect_scope
  • book/impls/30_basic_reactivity_system/150_other_apis

and more.

Issues that may be relevant are listed below.

@ubugeeei
Copy link
Member

ubugeeei commented Jan 8, 2024

@madogiwa0124

I have confirmed that the following diffs will resolve the issue in my local.

cool! perfect!

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

Successfully merging a pull request may close this issue.

2 participants