I tried an tried, locally and globally, more than 4 times, but I can't figure out how to install (and configure) nodejs/bower/wysihtml5-editor. That is what happend:
I would like to use this fancy wysiwyg-editor: here
So I had to do some research because I'm not a pro but I did this:
1. sudo apt-get update
2. sudo apt-get install git-core curl build-essential openssl libssl-dev
3. sudo git clone https://www.github.com/joyent/node.git
4. cd node
5. git tag #to see the versions
6. sudo git checkout v0.9.9
7. sudo ./configure
8. sudo make
9. sudo make install
10. sudo curl -L https://www.npmjs.org/install.sh | sudo sh
11. sudo npm -g grunt-cli
12. sudo npm install grunt
13. sudo npm install handlebars -g
14. sudo npm install -g bower
15. bower install bootstrap3-wysihtml5-bower
(Here is the tutorial)
But at the last Step I got the following Error-message (every god-damn-time):
TypeError: Object #<Object> has no method 'toLowerCase'
at Function.Buffer.isEncoding (buffer.js:240:32)
at assertEncoding (evalmachine.<anonymous>:98:27)
at Object.fs.writeFileSync (evalmachine.<anonymous>:908:3)
at Object.create.all.set (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:64:8)
at Object.Configstore (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:27:11)
at new Insight (/usr/local/lib/node_modules/bower/node_modules/insight/lib/index.js:26:34)
at ensureInsight (/usr/local/lib/node_modules/bower/lib/util/analytics.js:26:19)
at Object.setup (/usr/local/lib/node_modules/bower/lib/util/analytics.js:43:9)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/bin/bower:72:11)
at Module._compile (module.js:456:26)
I referenced to all files the Editor depends on:
<script src="node/node_modules/handlebars/lib/handlebars.js"></script>
<script src="node/node_modules/handlebars/lib/handlebars.runtime.js"></script>
<script type="text/javascript" src="wysihtml5/dist/bootstrap3-wysihtml5.min.js"></script>
<script type="text/javascript" src="wysihtml5/dist/bootstrap3-wysihtml5.all.min.js"></script>
<link rel="stylesheet" href="wysihtml5/dist/bootstrap3-wysihtml5.min.css">
I used google, stackoverflow, ... but it seems that no one had this problem. I would be so happy if anybody out there would give me an answer.
The System is a Linux XXX 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux.
Like I said I uninstalled all components (grunt, bower, handlebars, npm/nodejs) a few times an tried it in other directorys and so on; but no success.
I bet its a little fault which "drives me literally crazy and goes me on my sack". Should I install npm an all components only for using the editor? Or is it just fine by reference to the files?
Everything I get in the frontend is a non-styled-broken-editor...
Thanks guys and girls. :)
Aww man. I got it.
I reinstalled all components and bower thows a WARN engine
while installing. So I updated node to the latest version.
But there was the problem with the shi**y frontend. I just found out that you have to reference a lot of files to get it right.
My node version: v0.12.0
My bower version: v1.3.12
My npm version: v2.5.1
My nodejs version: v0.10.36
I don't know whether you need these (I don't think so) to get the editor running.
So here are the files I referenced:
<!-- WYSIHTML5-EDITOR -->
<link href="bower_components/bootstrap/dist/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet">
<link href="bower_components/components-font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="bower_components/bootstrap3-wysihtml5-bower/dist/bootstrap3-wysihtml5.all.min.js"></script>
<link rel="stylesheet" href="bower_components/bootstrap3-wysihtml5-bower/dist/bootstrap3-wysihtml5.css">
<!-- WYSIHTML5-EDITOR -->
<!-- SCRIPTS -->
<script type="text/javascript" src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="bower_components/handlebars/handlebars.runtime.min.js"></script>
<!-- SCRIPTS -->
Hope this will help somebody.