Jump to content

Topic on Project:Support desk

npm WARN tar ENOENT: no such file or directory

9
Guillaume Taillefer (talkcontribs)

I'm going to repost this here so that I can get a better chance at getting an answer.

I tried installing both the translation-server and the zotero service from mediawiki via their git commands, and upon going in their respective directories, and trying to use npm install, they give me 100+ different versions of the same error:

npm WARN tar ENOENT: no such file or directory ...

For example one of the ones from translation-service:

npm WARN tar ENOENT: no such file or directory, lstat '/home2/wwiiarch/translation-server/node_modules/.staging/core-js-f5f4dd1d/modules'

The common thing that I have found for both of these is that when I go into each node_modules directory, it shows that they're emtpy. This is despite the fact that none of the isntructions tell me anything about this, and just say to use the git command. However it seems that I use the npm commands its looking for a .staging folder inside node_modules.

My version of node is v10.24.1 (before I was trying v12.22.12 but it doesn't seem to change anything), and my version of npm is 6.14.16

How do I fix this problem? Thanks

TheDJ (talkcontribs)

windows, linux, local machine, managed or cloud ?

Guillaume Taillefer (talkcontribs)

Bluehost shared hosting using cpanel

CentOS 6

Guillaume Taillefer (talkcontribs)

Anyone know the answer to this?

Liliarif (talkcontribs)

If you already have package-lock.json file just delete it and try again.

Guillaume Taillefer (talkcontribs)

Ok so I deleted that from the zotero folder, and when I go into the zotero folder again and do npm install, it does the deprecated error messages at first like before, then it gives me this new error:

npm ERR! Command failed: git clone --mirror -q https://git@github.com/zotero/wicked-good-xpath.git /home2/wwiiarch/.npm/_cacache/tmp/git-clone-2c467b67/.git

npm ERR! warning: templates not found in /tmp/pacote-git-template-tmp/git-clone-ba1f6a03

npm ERR! fatal: unable to create thread: Resource temporarily unavailable

npm ERR! fatal: fetch-pack: invalid index-pack output

npm ERR!

npm ERR! A complete log of this run can be found in:

npm ERR!     /home2/wwiiarch/.npm/_logs/2022-11-07T21_29_27_222Z-debug.log

Guillaume Taillefer (talkcontribs)

If I put the package-lock.json files back in their original folders, then it returns to the same old error and deprecated messages

Guillaume Taillefer (talkcontribs)

If it helps these are the deprecated messages for npm install in zotero folder:

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

npm WARN deprecated core-js@2.6.5: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

npm WARN deprecated formidable@1.2.1: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau

npm WARN deprecated har-validator@5.1.3: this library is no longer supported

npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)

npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142

npm WARN deprecated request-promise-native@1.0.7: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142

npm WARN deprecated superagent@3.8.3: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.

npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

npm WARN deprecated w3c-hr-time@1.0.1: Use your platform's native performance.now() and performance.timeOrigin.

Guillaume Taillefer (talkcontribs)

I just tried to delete npm and node, and redownload them through nvm. Currently I am using v12.22.22. I then also updated npm using npm install -g npm. I then decided to use the following:

npm install --save core-js

So far everything pretty successful. I had then used npm outdated in zotero to see what was missing, and many things including aws-sdk, md5, require, and others. Because of this I decided to do npm install aws-adk, which then led to mostly success, to which the rest of the problems were solved with npm audit fix --force. This was successful. I then moved onto doing npm start. It then gave me this:

> translation-server@2.0.4 start

> node src/server.js

/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/browser/parser/html.js:170

    after._pushedOnStackOfOpenElements?.();

                                      ^

SyntaxError: Unexpected token '.'

    at wrapSafe (internal/modules/cjs/loader.js:915:16)

    at Module._compile (internal/modules/cjs/loader.js:963:27)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

    at Module.load (internal/modules/cjs/loader.js:863:32)

    at Function.Module._load (internal/modules/cjs/loader.js:708:14)

    at Module.require (internal/modules/cjs/loader.js:887:19)

    at require (internal/modules/cjs/helpers.js:74:18)

    at Object.<anonymous> (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/browser/parser/index.js:4:20)

    at Module._compile (internal/modules/cjs/loader.js:999:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)


I have no idea what to do with this, because going into the code it seems that it is supposed to all be there. If anyone has a solution that'd be great, Thanks

Reply to "npm WARN tar ENOENT: no such file or directory"