node js, npm install and window location jdk - node-java

I am installing the module ella on windows but I have a problem is that it does not work:
set JAVA_HOME =C:\Java\jdk1.8.0_91
npm install ella
And here is error:
npm WARN ella#1.5.1 No repository field.
checking user jdk
not found..
looking in user folder for jdk
looking for jdk in-> undefined/
undefined/
fs.js:808
return binding.readdir(pathModule._makeLong(path));
^
Error: ENOENT: no such file or directory, scandir 'F:\projet node\testItext
\node_modules\.staging\ella-3967a7fd\undefined'
at Error (native)
at Object.fs.readdirSync (fs.js:808:18)
at Object._search [as search] (F:\projet node\testItext\node_modules
\.staging \ella-3967a7fd\node_modules\file-tools\file-tools.js:77:20)
at search_jdk (F:\projet node\testItext\node_modules\.staging\ella-3967a7fd
\scripts\install.js:29:23)
at Array.look_user_folder (F:\projet node\testItext\node_modules\.staging
\ella-3967a7fd\scripts\install.js:91:12)
at install (F:\projet node\testItext\node_modules\.staging\ella-3967a7fd
\scripts\install.js:123:21)
at Object.<anonymous> (F:\projet node\testItext\node_modules\.staging\ella-
3967a7fd\scripts\install.js:128:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
He would not see the jdk
thank you in advance

Related

node.js / mac terminal - installing npm

Im trying to install npm for a to start a new project.
When i enter npm install, i get the following error in my terminal:
path.js:1086
cwd = process.cwd();
^
Error: EPERM: operation not permitted, uv_cwd
at Object.resolve (path.js:1086:25)
at Function.Module._resolveLookupPaths (internal/modules/cjs/loader.js:479:17)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:574:20)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:145:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
This worked for me:
Go to System Preferences/Security & Privacy/Full Disk Access
And give permission to the terminal, you must write your password
Make sure that the terminal has permission to access the folder.
Here is good documentation that can he

Node.js error - return process.dlopen(module, path._makeLong(filename));

Getting below error for return process.dlopen(module, path._makeLong(filename))
module.js:597
return process.dlopen(module, path._makeLong(filename));
^
Error: The specified procedure could not be found.
\\?\C:\SLIM_WORKSPACE\slim\slim-web\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64\binding.node
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\SLIM_WORKSPACE\slim\slim-web\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:211:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
I know am a bit late but this worked for me.
Issue these commands to help you remove/delete your project modules and then update them
$rm -rf node_modules/
$npm update
You only need to update your node and npm packages in the latest version.
$nvm install --lts // For install Node latest version
$npm update // For update all NPM packages in latest version
$nvm alias default **versionName** // For steup node default version of your PC or server```
Delete node_modules folder and reinstall dependencies as administrator with npm install

error cannot find module 'umask'

I just installed nodejs x64 on my Windows 10 computer. I keep all default config,
I open cmd and type:
npm -v
Then i got following error:
module.js:457
throw err;
^
Error: Cannot find module 'umask'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\W10-PRO\AppData\Roaming\npm\node_module\npm\lib\utils\umask.js:1:75)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
Every command start with "npm" create this error and npm cannot uninstall, update itself)
Please help me fix this error?
update your npm
$ npm install npm -g
I would try to update/install NPM
$ npm update -g npm
I know the answer!
Uninstall nodejs.
Delete all references to npm and nodejs (Program Files, Program Files(x86).
Then also delete those in AppData/Roaming (npm and npm-cache to be sure).
Reinstall nodejs.
It works!

Meteor npm install produces error: EIO i/o error

Trying to work with meteor on bash on ubunutu on windows and after installing node and meteor I run on my dir root:
meteor npm install
And I get:
meteor npm install
/home/user/.meteor/packages/meteor-tool/.1.4.0-1.13j49n2++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cli/dev-bundle.js:113
throw e;
^
Error: EIO: i/o error, stat '/mnt/d/app/.meteor/local/dev_bundle'
at Error (native)
at Object.fs.statSync (fs.js:844:18)
at statOrNull (/home/mateo/.meteor/packages/meteor-tool/.1.4.0-1.13j49n2++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cli/dev-bundle.js:110:19)
at getDevBundleDir (/home/mateo/.meteor/packages/meteor-tool/.1.4.0-1.13j49n2++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cli/dev-bundle.js:31:23)
at Object.<anonymous> (/home/mateo/.meteor/packages/meteor-tool/.1.4.0-1.13j49n2++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cli/dev-bundle.js:172:18)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
So I go to .meteor/local/dev_bundle and see this:
HAve no idea what to do with this strange error. I'm using "bash on ubunutu on windows" which is Bash on Windows 10.

Error: Cannot find module 'lodash._basetostring'

I cant seem to ran any commands against > npm including > npm help ,> npm uninstall or > npm upgrade
the full error is
module.js:339
throw err;
^
Error: Cannot find module 'lodash._basetostring'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npmlog\node_modules\gauge\node_modules\lodash.pad\index.js:9:20)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
I cant run > npm install lodash._basetostring or npm anything
Tried reinstalling and running 'npm cache clean' but even that didn't work, so here's my solution:
Delete all files from, you may want to backup the files first but those are corrupted anyway.
<user profile directory>\AppData\Roaming\npm\node_modules
and then try running npm command, if this works then there's no need to reinstall, just install npm modules using
npm install -g <package names>
Otherwise uninstall node.js, empty above stated folder and then install node.js.
Don't forget to update npm
npm install npm#latest -g

Resources