jeudi 19 février 2015

nodejs/bower Error "toLowerCase"

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 http://ift.tt/17UANQ0

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 http://ift.tt/1fenI0w | 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. :)


Aucun commentaire:

Enregistrer un commentaire