bbeesley / trakt-to-letterboxd

CLI tool for publishing your trakt watched history to your letterboxd account
81 stars 6 forks source link

Install for [ 'trakt-to-letterboxd@latest' ] failed with code 1 #709

Open moshin34 opened 1 year ago

moshin34 commented 1 year ago

Seems hard to mess up instructions this simple. Heres the error I receive.

administrator@PINGU:~$ npx trakt-to-letterboxd -u <USERNAME> -f test.csv

npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/administrator/.npm/_logs/2023-11-06T01_18_25_708Z-debug.log
Install for [ 'trakt-to-letterboxd@latest' ] failed with code 1
moshin34 commented 1 year ago

Log file:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/bin/node',
1 verbose cli   '/usr/local/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'trakt-to-letterboxd@latest',
1 verbose cli   '--global',
1 verbose cli   '--prefix',
1 verbose cli   '/home/administrator/.npm/_npx/6620',
1 verbose cli   '--loglevel',
1 verbose cli   'error',
1 verbose cli   '--json'
1 verbose cli ]
2 info using npm@5.1.0
3 info using node@v12.22.9
4 verbose npm-session 1e0833e957e28a5c
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/trakt-to-letterboxd 28ms (from cache)
8 silly pacote tag manifest for trakt-to-letterboxd@latest fetched in 54ms
9 verbose stack TypeError: cb.apply is not a function
9 verbose stack     at /usr/local/lib/node_modules/npx/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
9 verbose stack     at FSReqCallback.oncomplete (fs.js:169:5)
10 verbose cwd /home/administrator
11 verbose Linux 6.2.0-36-generic
12 verbose argv "/usr/bin/node" "/usr/local/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js" "install" "trakt-to-letterboxd@la>
13 verbose node v12.22.9
14 verbose npm  v5.1.0
15 error cb.apply is not a function
16 verbose exit [ 1, true ]
ldoench commented 10 months ago

Having the same problem. Had a clean server with fresh installed npm and npx.

The function in graceful-fs that triggers this error is following:

function statFix (orig) {
  if (!orig) return orig
  // Older versions of Node erroneously returned signed integers for
  // uid + gid.
  return function (target, cb) {
    return orig.call(fs, target, function (er, stats) {
      if (!stats) return cb.apply(this, arguments)
      if (stats.uid < 0) stats.uid += 0x100000000
      if (stats.gid < 0) stats.gid += 0x100000000
      if (cb) cb.apply(this, arguments)
    })
  }