mercredi 25 octobre 2017

Why does an import make that my template is not rendered

I have been facing an issue yesterday and can't resolve it since. I am trying to do a web app using ember.js and ember data in Webstorm on Windows 10. The web app is going to be used by users so I want to 'hash' a part of the data before sending it to my database (Firebase).

To do this, I searched a bit and found bcrypt. I installed it using the "npm install bcrypt --save-dev" command. No issues on install so I tried to use it.

BUT when importing bcrypt in my controller add-device.js (I tried "bcrypt = require('bcrypt');" and "import bcrypt from 'bcrypt';") the data inside the template corresponding to the controller is not being displayed anymore and I don't understand why.

I have submitted the 'project' on github: http://ift.tt/2zODl0V so it can be easier to see everything.

I feel like the bcrypt module is installed at the right place and that the dependencies are ok (node-gyp, nodeJS..) but.. maybe not, I don't really know as I come from C and started coding webapp 2 weeks ago.

Here are the versions of npm, nodeJs, node-gyp and bcrypt (maybe useful):

npm: v5.5.1

nodeJs: v6.11.3

node-gyp: v3.6.2

bcrypt: v1.0.3

I already tried to uninstall and re-install bcrypt but wihtout succes..

Please let me know if you have any suggestions or additional questions! :)




Aucun commentaire:

Enregistrer un commentaire