Coder Social home page Coder Social logo

Fails to work with NextJs about ecctrl HOT 8 CLOSED

Magvin avatar Magvin commented on August 23, 2024
Fails to work with NextJs

from ecctrl.

Comments (8)

ErdongChen-Andrew avatar ErdongChen-Andrew commented on August 23, 2024 1

Thanks @Magvin , I ended up generating different versions of the main file and publishing the dist folder. This resolved all the errors, and now everything works smoothly 😁.

from ecctrl.

Magvin avatar Magvin commented on August 23, 2024

UPD: when i'm trying to do it via 'transpilePackages' in next.config.js in complains about three.js
image

from ecctrl.

ecaii avatar ecaii commented on August 23, 2024

I had the same issue, I resolved it by adding ecctrl to the transpilePackages in next.config.js.

Such as const nextConfig = { transpilePackages: ['three', 'ecctrl'], }

from ecctrl.

Magvin avatar Magvin commented on August 23, 2024

tried, three complains then.
what version of Next you are using?

from ecctrl.

ecaii avatar ecaii commented on August 23, 2024

There.
"ecctrl": "^1.0.25", "next": "13.4.19", "three": "^0.156.1", "react": "18.2.0", "react-dom": "18.2.0",

What is three complaining about ?

from ecctrl.

ErdongChen-Andrew avatar ErdongChen-Andrew commented on August 23, 2024

😱 I've encountered a similar issue when using the npm package with 'create-react-app.' However, when I run the package locally, everything works fine. I will take some time to figure this out and make the necessary adjustments. 😅

from ecctrl.

Magvin avatar Magvin commented on August 23, 2024

@ecaii ah ok we are still on 13.2.4, This is issue is within nextjstranspilePackage they have fixed it on 13.4v.
I think easier @ErdongChen-Andrew is just to ship dist folder fully compiled as npm module

from ecctrl.

Magvin avatar Magvin commented on August 23, 2024

Legend thanks

from ecctrl.

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.