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

three0.167.1 vite build bug #29054

Closed
flowers-10 opened this issue Aug 2, 2024 · 5 comments
Closed

three0.167.1 vite build bug #29054

flowers-10 opened this issue Aug 2, 2024 · 5 comments
Milestone

Comments

@flowers-10
Copy link

Description

I have no issues using version 0.166.0.

0.167.1:
yarn run build
yarn run v1.22.19
$ vue-tsc && vite build
node_modules/@types/three/examples/jsm/loaders/KTX2Loader.d.ts:2:42 - error TS2307: Cannot find module 'three/webgpu' or its corresponding type declarations.
There are types at '/Users/channel1/Desktop/Project/DigitalTwin/node_modules/@types/three/build/three.webgpu.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

2 import { Renderer, WebGPURenderer } from "three/webgpu";
error Command failed with exit code 2.

Reproduction steps

1.version: "@types/three": "^0.167.1","three": "^0.167.1",
2.yarn run build
3.error Command failed with exit code 2.

Code

// code goes here

Live example

Screenshots

439126896

Version

r167.1

Device

No response

Browser

No response

OS

No response

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 2, 2024

Do you mind trying it with this Vite configuration: #28650 (comment)

@donmccurdy
Copy link
Collaborator

I think imports from three/webgpu may need to be avoided somehow here:

https://github.com/three-types/three-ts-types/blob/master/types/three/examples/jsm/loaders/KTX2Loader.d.ts

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 5, 2024

/ping @Methuselah96

@Methuselah96
Copy link
Contributor

Methuselah96 commented Aug 5, 2024

It sounds like you probably have moduleResolution set to either node/node10 in your tsconfig.json (implicitly or explicitly) which should no longer be used. See this guide for advice on how to configure TypeScript to resolve this.

See three-types/three-ts-types#1136 for more info and/or to discuss further.

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 5, 2024

Merging this issue into three-types/three-ts-types#1136.

@Mugen87 Mugen87 closed this as completed Aug 5, 2024
@Mugen87 Mugen87 added this to the r168 milestone Aug 11, 2024
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

4 participants