I recently switched to Ubuntu 14.04, and also worked on my Mac machine. This project is cloned from the same repo, but behaves differently on two machines. I have no clue why, please help me.
I used this line to hashed my password, and it works fine on my mac machine.
var hashed = crypto.pbkdf2Sync(entered,this.salt,12000,128).toString('hex');
However, in Ubuntu, it gives following errors:
> node ./bin/www
crypto.js:574
var ret = binding.PBKDF2(password, salt, iterations, keylen, digest);
^
TypeError: Not a buffer
at TypeError (native)
at pbkdf2 (crypto.js:574:23)
at Object.exports.pbkdf2Sync (crypto.js:553:10)
at model.<anonymous> (/media/linux/app/dataModel/userModel.js:30:33)
at _next (/media/linux/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:62:30)
at fnWrapper (/media/linux/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:18)
at model.Object.defineProperty.value.fn (/media/linux/app/node_modules/mongoose/lib/schema.js:215:9)
at _next (/media/linux/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:62:30)
at fnWrapper (/media/linux/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:18)
at /media/linux/app/node_modules/mongoose/lib/schema.js:198:13
at complete (/media/linux/app/node_modules/mongoose/lib/document.js:1107:5)
at /media/linux/app/node_modules/mongoose/lib/document.js:1133:20
at ObjectId.SchemaType.doValidate (/media/linux/app/node_modules/mongoose/lib/schematype.js:645:22)
at /media/linux/app/node_modules/mongoose/lib/document.js:1129:9
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! code ELIFECYCLE
npm ERR! app#0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app#0.0.0 start script 'node ./bin/www'.
npm ERR! This is most likely a problem with the bocerapp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get their info via:
npm ERR! npm owner ls app
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /media/linux/app/npm-debug.log
Thanks in advance!
Related
I want to install firebase tools but i am getting error when i run the commad
PS C:\Users\HP\Desktop\FireBlogs> npm i -g firebase-tools
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Program Files\nodejs\node_modules\firebase-tools
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\firebase-tools'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\firebase-tools'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\firebase-tools'npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor
or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Local\npm-cache\_logs\2022-02-13T19_07_01_384Z-debug-0.log
I tried few solution but nothing worked for me. I tried installing firebase-tools#v3.17.2 that seemed to work for some people, also tried reinstalling nodejs to lts versin aswell to older versions.
I'm new in react-native, I'm trying to set up my project after all package install when I tried to start npm start command then show me 'expo-cli' is not recognized as an internal or external command, this error.
ok, then I have followed the guide from here
after that I have added my env path in this way:
environment variable > System Variables > PATH >
C:\Users\YOUR_USERNAME\AppData\Roaming\npm
then I have to install again:
npm install -g expo-cli
but it does not work for me, I don't know why.
when I try to run this command npm install -g expo-cli then show me an error like this:
PS C:\Users\alami\OneDrive\Desktop\React native\starter-react-native> npm install -g expo-cli
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Program Files\nodejs\node_modules\expo-cli
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\expo-cli'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\expo-cli'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\expo-cli'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\alami\AppData\Local\npm-cache\_logs\2021-05-21T00_58_34_585Z-debug.log
At least I just solved my problem in this way:
Search cmd
Then run as administrator
Then npm i -g expo-cli
I just solved my problem.
Im trying to install socket.io into my beagleboneblack, system says my node -v is v0.8.22 and for installation should be at least higher than 0.10.0.
but I can`t upgrade my node.
For installing socket.io, I enter the following text:
/usr/bin/ntpdate -b -s -u pool.ntp.org
cd /var/lib/cloud9
npm install socket.io
cp bonescript-socketio/* /var/lib/cloud9
Error message:
http GET https://registry.npmjs.org/socket.io-parser/2.3.1
WARN engine object-assign#4.1.0: wanted {"node":">=0.10.0"} (current: {"node":"v0.8.22","npm":"1.2.14"})
ERR! fetch failed https://registry.npmjs.org/ms/-ms-0.7.1.tgz
Error message upon completion:
npm ERR! Error: getaddrinfo ENOTFOUND
npm ERR! at errnoException (dns.js:37:11)
npm ERR! at Object.onanswer [as oncomplete] (dns.js:124:16)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.8.13
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /var/lib/cloud9
npm ERR! node -v v0.8.22
npm ERR! npm -v 1.2.14
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm http GET https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm http GET https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/lib/cloud9/npm-debug.log
npm ERR! not ok code 0
for node upgrade I've tried
opkg update
but server seems to be down..
Appreciate your attention.
If you type in:
cat /etc/dogtag
you will get a readout. This readout tells you what version of Linux you have on your machine. If you go to http://elinux.org/Beagleboard:BeagleBoneBlack_Debian, the images are updated regularly for the BBB and BBG boards.
Try to update your image and then upgrade to the newer version of socket.io.
Seth
P.S. If this does not work, please let me know.
I am having some trouble with grunt. I am using a small software piece writing by us to publish and make an email, however when I run the command to create the emails a grunt error happens and I have tried fixing it but I cannot, it works on the rest of my teams computer but it does not work on mine. Could someone please help?
Running "imagemin:dynamic" (imagemin) task
Fatal error: Cannot read property 'contents' of undefined
Thank you for the help
These are other errors I get:
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v4.2.4
npm ERR! npm v3.5.3
npm ERR! code ELIFECYCLE
npm ERR! emails#1.0.0 dev: `grunt default`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the emails#1.0.0 dev script 'grunt default'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the emails package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! grunt default
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs emails
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls emails
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/iPatriot/projects/aliada/emails/npm-debug.log
I try to install node.js modules using:
npm install express
but I get this error:
npm http GET https://registry.npmjs.org/express
npm ERR! TypeError: Request path contains unescaped characters.
npm ERR! at Agent.request (_http_agent.js:264:11)
npm ERR! at TunnelingAgent.exports.request (http.js:52:22)
npm ERR! at TunnelingAgent.createSocket (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:117:25)
npm ERR! at TunnelingAgent.createSecureSocket [as createSocket] (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:184:41)
npm ERR! at TunnelingAgent.addRequest (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:80:8)
npm ERR! at new ClientRequest (_http_client.js:112:16)
npm ERR! at Agent.request (_http_agent.js:279:10)
npm ERR! at Object.exports.request (https.js:130:22)
npm ERR! at Request.start (/usr/local/lib/node_modules/npm/node_modules/request/index.js:594:30)
npm ERR! at Request.end (/usr/local/lib/node_modules/npm/node_modules/request/index.js:1186:28)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.6.11-7.fc16.x86_64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express"
npm ERR! cwd /usr/local/src/node
npm ERR! node -v v0.11.5-pre
npm ERR! npm -v 1.3.5
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/local/src/node/npm-debug.log
npm ERR! not ok code 0
May be happening I use a proxy I set it up this way to allow downloads from ips outside my network
export https_proxy='http://172.21.0.12:3128'
I hope you can help me
Set proxy from commandline.
npm config set proxy http://proxydomain:port/
If error occur yet, additional try next.
npm config set registry http://registry.npmjs.org/
These work for me.
(ref http://sushichop.blogspot.jp/2013/01/npm-install.html)
Though late enough, I've bumped into this too after updating nodejs (to 4.1.1) and npm (to something like 1.4.x) on Linux.
I've tried the suggested solution, but changing the registry entry did not help in all cases.
Lastly, having decided to reinstall npm, I found this update source [on npm github][1]
curl -L https://www.npmjs.org/install.sh | sh
which updated my npm to 3.3.8 and all related package installation troubles have been blown away.