Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using .nvmrc for v12.4.0 fails npm install #45

Open
codeluggage opened this issue Mar 9, 2022 · 0 comments
Open

Using .nvmrc for v12.4.0 fails npm install #45

codeluggage opened this issue Mar 9, 2022 · 0 comments

Comments

@codeluggage
Copy link

tldr; the .nvmrc is likely outdated and using the lts node v16.14.0 (npm v8.3.1) seems fine

Issue

I have set my nvm to use .nvmrc automatically, so this was the version it switched to for the latest a6bbcf1edca5712c0e42542a74a4f0dae93d4012:

Now using node v12.4.0 (npm v6.9.0)

Which then gave this error output when trying to npm i:

➜  gitspeak-desktop git:(master) npm i
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!

> [email protected] postinstall /Users/mf/closed-source/scrimba/gitspeak-desktop/node_modules/electron
> node install.js


> [email protected] postinstall /Users/mf/closed-source/scrimba/gitspeak-desktop
> electron-builder install-app-deps

Error: Cannot find module 'fs/promises'
Require stack:
- /Users/mf/closed-source/scrimba/gitspeak-desktop/node_modules/builder-util/out/fs.js
- /Users/mf/closed-source/scrimba/gitspeak-desktop/node_modules/builder-util/out/util.js
- /Users/mf/closed-source/scrimba/gitspeak-desktop/node_modules/electron-builder/out/cli/cli.js
- /Users/mf/closed-source/scrimba/gitspeak-desktop/node_modules/electron-builder/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/mf/closed-source/scrimba/gitspeak-desktop/node_modules/builder-util/src/fs.ts:5:1)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/mf/closed-source/scrimba/gitspeak-desktop/node_modules/builder-util/src/util.ts:25:1)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `electron-builder install-app-deps`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mf/.npm/_logs/2022-03-09T15_25_51_823Z-debug.log

Fix?

Using lts seems fine. I can use gitspeak like usual - unless I'm missing something :)

npm i with node v16.14.0 (npm v8.3.1):

➜  gitspeak-desktop git:(master) npm i
npm WARN deprecated [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Disk image license agreements are deprecated by Apple and will probably be removed in a future macOS release. Discussion at: https://github.com/argv-minus-one/dmg-license/issues/11

> [email protected] postinstall
> electron-builder install-app-deps

  • electron-builder  version=22.14.13
  • loaded configuration  file=package.json ("build" field)

added 643 packages, and audited 644 packages in 12s

26 packages are looking for funding
  run `npm fund` for details

26 vulnerabilities (18 moderate, 6 high, 2 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

When running npm start I do get an error for node-pty but still seems to run fine:

➜  gitspeak-desktop git:(master) npm start

> [email protected] start
> electron .

[23:27:00.040] [info] App starting...
[23:27:00.130] [info] Skip checkForUpdatesAndNotify because application is not packed
[23:27:00.270] [info] []
[23:27:00.373] [info] could not load pty Error: Cannot find module 'node-pty'
Require stack:
- /Users/mf/closed-source/scrimba/gitspeak-desktop/lib/terminal/runner.js
- /Users/mf/closed-source/scrimba/gitspeak-desktop/lib/terminal.js
- /Users/mf/closed-source/scrimba/gitspeak-desktop/lib/wss.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/mf/closed-source/scrimba/gitspeak-desktop/lib/terminal/runner.js:4:12)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (/Users/mf/closed-source/scrimba/gitspeak-desktop/node_modules/imba/register.js:41:26)
    at Module._load (node:internal/modules/cjs/loader:829:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/mf/closed-source/scrimba/gitspeak-desktop/lib/terminal/runner.js',
    '/Users/mf/closed-source/scrimba/gitspeak-desktop/lib/terminal.js',
    '/Users/mf/closed-source/scrimba/gitspeak-desktop/lib/wss.js'
  ]
}

[23:27:00.389] [info] ["starting socket server on 48000"]
[23:27:10.392] [info] ["checking ws connections"]

and logs were fine from this point onwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant