Skip to content
Advertisement

Tag: npm

npm outdated -g Error ‘Cannot read property ‘length’ of undefined’

I am trying to determine the version status of my npm installed global packages. After running the npm outdated -g –depth=0 in the terminal I receive this error: Contents of /Users/dangranger/.npm/_logs/2019-03-14T21_58_37_962Z-debug.log Can anyone help resolve this issue for me? Thanks Answer If you do not want to go through the bother of uninstalling and reinstalling Node, you can manually edit

Run node module in browser

I’m trying to upload and read excel file using this node module: read-excel-file and according to the instructions under Browser I need to put this code in my .js file: But the browser doesn’t know what is import readXlsxFile from ‘read-excel-file’. It should be noted that I’m using http-server to see my project at http://localhost:8080/ Answer TL;DR: You have to

Node engine 8.x or 10.x in package.json

I tried to specify the node engine in a package.json to accept both 8 and 10 version. I tried to type this: But running yarn results in: The engine “node” is incompatible with this module. Expected version “8.x|10.x” If I replace with: … it works (i.e no error). Is there a way to accept two versions of node engine in

Does npx look for globally installed packages?

I am using Node.js 10.1.0 and npm 6.0.0. I have installed a package with npm install -g example-package, Will npx look for it? What about npx -p example-package, does it only look on npm registry? Answer NPX included in NPM 5.2 which looks in your local/node_modules folder to avoid version mismatch with the globally installed package version If package is

Can’t install any NPM package, error 4058

I’m trying to install Grunt on my project. It used to work perfectly, but now for some reason, it does not. Every time i try to install Grunt, I got this error: The weird thing is that the missing package change every time. I try verifying the cache, removing the node_modules folder, cleaning the cache using –force. Uninstall NPM and

Advertisement