Coder Social home page Coder Social logo

Comments (8)

lipsumar avatar lipsumar commented on August 20, 2024 12

For me it was this that solved the "module not found" error: #44 + import SweetModal from 'sweet-modal-vue/src/plugin.js' (src/ is missing in the docs)

from sweet-modal-vue.

scottadamsmith avatar scottadamsmith commented on August 20, 2024 4

All the solutions noted in here sound as though you are allowing this library to be built via your app's webpack config. That seems like a dangerous path to me. What if the library opts to switch from Sass to some other option like Less down the road? I believe you'd have to update your config to setup loaders for it. Please correct me if I am wrong, but it seems to me that something needs to change in the library so that your webpack config does not have an impact on importing the library.

from sweet-modal-vue.

anthonywebster avatar anthonywebster commented on August 20, 2024 2

@daverogers I solved adding these lines in my webpack configuration

captura de pantalla de 2017-11-15 22 04 55

from sweet-modal-vue.

daverogers avatar daverogers commented on August 20, 2024 1

Confirmed successful build after adding this line to webpack:
extensions: ['*', '.js', '.vue'],

Cheers 🍻

from sweet-modal-vue.

daverogers avatar daverogers commented on August 20, 2024

I'm running into the same error. I tried installing both globally and on a single component (import { SweetModal, SweetModalTab } from 'sweet-modal-vue')

from sweet-modal-vue.

martinhschei avatar martinhschei commented on August 20, 2024

I had almost the same error after installing it globally.

This dependency was not found:
sweet-modal-vue/plugin.js in ./src/main.js
To install it, you can run: npm install --save sweet-modal-vue/plugin.js

tried adding /src to the import path ( 'sweet-modal-vue/src/plugin.js' ) and it now works.
thanks!

(edit: typo)

from sweet-modal-vue.

martinhschei avatar martinhschei commented on August 20, 2024

after working perfectly for several months npm now gives this error when running npm watch-poll:

Module not found: Error: Can't resolve 'sweet-modal-vue/src/plugin.js'

if i remove /src/plugin.js we are back to the error mentioned above.

anyone?

--- EDIT

seems like the module actually was removed after re-adding it with npm it now works like before.

from sweet-modal-vue.

MoSha-lab avatar MoSha-lab commented on August 20, 2024

For me it was this that solved the "module not found" error: #44 + import SweetModal from 'sweet-modal-vue/src/plugin.js' (src/ is missing in the docs)

Thanks to this mention, in my case, it solved almost same by import { SweetModal , SweetModalTab } from 'sweet-modal-vue/dist/sweet-modal'

from sweet-modal-vue.

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.