Git Product home page Git Product logo

Comments (6)

Sub-Xaero avatar Sub-Xaero commented on June 12, 2024 1

Damn.
Looks like something in the build system is broken, #76 never used to be a problem either.

I'm going back to basics, simplifying the build system and only supporting ESModules, If you want to add "stimulus-library": "0.8.0-beta" to your package.json and let me know if that fixes this for you?

from stimulus-library.

pySilver avatar pySilver commented on June 12, 2024 1

Works fine that way!

from stimulus-library.

Sub-Xaero avatar Sub-Xaero commented on June 12, 2024

Hi @pySilver ,

stimulus was the original NPM package for versions 1 and 2. @hotwired/stimulus is the new 3.0 version.
As of 3.0 the stimulus package is just a wrapper around @hotwired/stimulus, but I made the conscious decision to use it for compatibility with projects that are still using v2.

Other than a slightly annoying "missing peer dependency" error for ~47% of the people using @hotwired/stimulus package over the stimulus package, it shouldn't cause any issues with the functionality of the library.

Technically I could remove the peerDependency on stimulus, because the controllers don't need it at runtime. I might do that to avoid confusion.

Any thoughts?

from stimulus-library.

pySilver avatar pySilver commented on June 12, 2024

Hello @Sub-Xaero ,

Honestly I'm not sure what would be the proper workaround. At the moment once installed stimulus-library I'm not able to build my app without explicitly installing stimulus package. Build script fails with the following error:

ERROR in ./node_modules/stimulus-library/dist/stimulus-library.es.js 21:0-38
Module not found: Error: Can't resolve 'stimulus' in '/Users/Silver/Projects/xxxxxxx-ui/node_modules/stimulus-library/dist'

webpack compiled with 1 error

Obviously, to make it work, I should add the stimulus wrapper dependency into my project too which is tedious.

from stimulus-library.

Sub-Xaero avatar Sub-Xaero commented on June 12, 2024

Yeah that's not great. Sorry about that!

I've just released 0.7.5, which removes stimulus as a peerDependency, let me know if that fixes the issue for you @pySilver

from stimulus-library.

pySilver avatar pySilver commented on June 12, 2024

Its results in a different issue with the updated version :)

ERROR in ./node_modules/stimulus-library/dist/stimulus-library.es.js 21:0-77
Module not found: Error: Can't resolve 'lodash-es' in '/Users/Silver/Projects/proj-ui/node_modules/stimulus-library/dist'

ERROR in ./node_modules/stimulus-library/dist/stimulus-library.es.js 22:0-99
Module not found: Error: Can't resolve 'date-fns' in '/Users/Silver/Projects/proj-ui/node_modules/stimulus-library/dist'

ERROR in ./node_modules/stimulus-library/dist/stimulus-library.es.js 607:29-610:3
Module not found: Error: Can't resolve 'smoothscroll-polyfill' in '/Users/Silver/Projects/proj-ui/node_modules/stimulus-library/dist'

webpack compiled with 3 errors
error Command failed with exit code 1.

from stimulus-library.

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.