Coder Social home page Coder Social logo

[vite] Internal server error: Failed to resolve import "@tweenjs/tween.js/dist" from "src\index.ts". Does the file exist? about tween.js HOT 3 CLOSED

zhangxinyong12 avatar zhangxinyong12 commented on June 5, 2024
[vite] Internal server error: Failed to resolve import "@tweenjs/tween.js/dist" from "src\index.ts". Does the file exist?

from tween.js.

Comments (3)

mk965 avatar mk965 commented on June 5, 2024

You should import like this:

import { Tween, update } from '@tweenjs/tween.js';

from tween.js.

achuan9 avatar achuan9 commented on June 5, 2024

cd node_modules/@tweenjs/tween.js && pnpm build

from tween.js.

trusktr avatar trusktr commented on June 5, 2024

Not very clear what the issue is. It is better if you show some code.

If you are writing something like

import ... from "@tweenjs/tween.js/dist"

then try this instead like @mk965 hinted:

import ... from "@tweenjs/tween.js"

Note, try the new version 21.0.0. import ... from "@tweenjs/tween.js" should work with all modern tools now.

Please re-open if you have more info and it still doesn't work.

from tween.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.