live-codes / livecodes

Code Playground That Just Works!
https://livecodes.io
MIT License
778 stars 66 forks source link

Bug: npm install errors #408

Closed gapmiss closed 1 year ago

gapmiss commented 1 year ago

Describe the bug

Greetings~

Attempted to experiment with offline capabilities by following the guidance here (https://github.com/live-codes/livecodes/issues/290).

Running npm install failed w/ errors:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@es-joy/jsdoccomment@0.36.1',
npm WARN EBADENGINE   required: { node: '^14 || ^16 || ^17 || ^18 || ^19' },
npm WARN EBADENGINE   current: { node: 'v20.5.1', npm: '9.8.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'eslint-plugin-jsdoc@39.6.4',
npm WARN EBADENGINE   required: { node: '^14 || ^16 || ^17 || ^18 || ^19' },
npm WARN EBADENGINE   current: { node: 'v20.5.1', npm: '9.8.0' }
npm WARN EBADENGINE }
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:28146) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
npm ERR! code ERR_INTERNAL_ASSERTION
npm ERR! This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
npm ERR! Please open an issue with this stack trace at https://github.com/nodejs/node/issues
npm ERR!

npm ERR! A complete log of this run can be found in: /Users/gapmiss/.npm/_logs/2023-08-15T15_05_37_451Z-debug-0.log

I've attached the log file.

2023-08-15T15_05_37_451Z-debug-0.log

Steps to reproduce

  1. git clone https://github.com/live-codes/livecodes
  2. cd livecodes
  3. npm install

Affected services

Repo build/deploy

Platforms

Desktop

Browsers

No response

Environment

Development, Self-Hosted, Local

Share URL(s)

n/a

Configuration

n/a

Additional context

I last successfully built livecodes a week or so ago, but since then, my macOS environment has changed. I did a wipe-n-clean install of macOS Monterey 12.6.8, along with homebrew and clean installs of node, etc. Previously, the version of macOS was Monterey 12.5.

Is it already fixed?

No

Code of Conduct

Contributing Docs

hatemhosny commented 1 year ago

Hi @gapmiss

This seems like an internal problem in your node environment. I have not made any changes that might interfere with installation over the past week. In addition, npm installation runs successfully on github actions and on cloudflare pages (last tested today). Did you try running npm install on any other project to see if it also fails?

gapmiss commented 1 year ago

From your experience, could these errors be caused by network issues? Have been experiencing some intermittent Internet latency here in rural N. Carolina today.

I did try npm install with a couple of other libraries and indeed did experience the same errors, although about 50% were successful, despite the errors. I also deleted the .npm cache on my MacBook Air, which didn't seem to make any difference.

After a few more tries, I was able to successfully run npm install for livecodes, but still had quite a few of the same errors, this time NOT completely failing.

Appreciate your time. This does indeed appear to be a local issue, although I have yet to narrow it down.

Thanks again for the great software!

gapmiss commented 1 year ago

In case someone runs across this issue, I do believe it is a network concern. I use Mullvad VPN and it appears that their I.P. addresses may be being blocked or limited some how. If I disable the VPN, every npm install i've tested has succeeded. I will continue to monitor and report back anything new.