bootstrap-wysiwyg / bootstrap3-wysiwyg

Simple, beautiful wysiwyg editor
http://bootstrap-wysiwyg.github.io/bootstrap3-wysiwyg/
MIT License
834 stars 264 forks source link

how to install it from npm #193

Open mockiemockiz opened 7 years ago

mockiemockiz commented 7 years ago

i run this command: npm install bootstrap3-wysihtml5-npm

I added this into my app.js (i use laravel 5.4): require('bootstrap3-wysihtml5-npm');

and i got this error when I run "npm run dev":

These dependencies were not found in node_modules:

rbruhn commented 6 years ago

@mockiemockiz Did you ever find a solution for this? Discovering the same problem.

spieIbug commented 6 years ago

@rbruhn @mockiemockiz The project is only on bower. I've found a fork on npm, but i don't recommand it.

Information

FYI, You can install Bower dependencies through npm install. I suppose you have your bower.json dependencies file, so you've just to place this in your package.json

"scripts": {
  "postinstall": "bower install"
}

Becarefull, On bower site, it's clearly mentionned ...psst! While Bower is maintained, we recommend using Yarn and Webpack for front-end projects read how to migrate!

So according to this documentation. You can do this :

Solution

"dependencies": {
    ...,
    "@bower_components/bootstrap3-wysihtml5-bower": "bootstrap-wysiwyg/bootstrap3-wysiwyg",
    ...
  }

This command looks for the dependecy from Github repository.

The result of this command will be :

node_modules/@bower_components/bootstrap3-wysihtml5-bower/

rbruhn commented 6 years ago

@meyacine Thanks for the help. I tried your way, and several other variations. Yarn would not work for me as I kept getting an I/O error for some reason. I eventually got all the scripts in using aliases in Webpack but then, for some reason, none of my other jQuery code worked. Even trying out various noConflict solutions nothing helped.

I finally decided to ditch this effort after two days and use Summernote. Installed and worked right from the get go.