scripting / Scripting-News

I'm starting to use GitHub for work on my blog. Why not? It's got good communication and collaboration tools. Why not hook it up to a blog?
121 stars 10 forks source link

Error: Missing required argument #1 #172

Closed scripting closed 4 years ago

scripting commented 4 years ago

I just set up a new server, with a freshly installed Node and NPM. I then installed my PagePark app from its GitHub repository. I ran npm install. And got an error message that others have reported. It appears to be an internal error in NPM. Text of the error messages below.

What is the fix or workaround?

Versions

Ubuntu 18.04.3 (LTS) x64

Node v8.10.0

NPM v3.5.2

PagePark repo

git clone https://github.com/scripting/pagepark.git

Error messages

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated buffer@4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm WARN deprecated path-is-absolute@2.0.0: This package is no longer relevant as Node.js 0.12 is unmaintained.
npm ERR! Linux 4.15.0-66-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>
npm ERR! Linux 4.15.0-66-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>
scripting commented 4 years ago

Weird thing --

I am able to npm install on my Mac desktop.

Versions are very different.

Node -- v12.13.1

NPM -- 6.12.1

How is it that I'm running much higher versions on my desktop than on the freshly provisioned server??

This is all so weird.

aaronaxvig commented 4 years ago

Node 8.10.0 is the version included in the Ubuntu package manager for Ubuntu 18.04 (explained very well in this Digital Ocean article).

The article describes how you can get a newer version of Node using the NodeSource PPA.

Not sure if a newer version on your server will solve your actual error message, but this at least answers one of your questions I hope!

aaronaxvig commented 4 years ago

I'm not a Linux expert but I believe that the packages included in a particular Ubuntu release such as 18.04 LTS stay at their released version for stability...would get security and bug fixes though I suppose.

scripting commented 4 years ago

@aaronaxvig -- that worked! I am able to npm install pagepark and it's running on the server now. So tomorrow I should be able to get some work done. Thanks for your help! ;-)