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

TypeError: Cannot read properties of undefined (reading 'version') #52

Open
root4loot opened this issue May 22, 2022 · 5 comments
Open

Comments

@root4loot
Copy link

root4loot commented May 22, 2022

$ npm install --global node-nightly
$ node-nightly
Checking for update...
TypeError: Cannot read properties of undefined (reading 'version')
    at /usr/local/lib/node_modules/node-nightly/node_modules/node-nightly-version/index.js:17:70
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
$ cat /usr/local/lib/node_modules/node-nightly/node_modules/node-nightly-version/index.js
'use strict';
const fetch = require('isomorphic-fetch');
const nightlyVersions = require('node-nightly-versions');
const osArch = `${process.platform}-${process.arch}`;
const osVerMap = {
  'win32-x64':'win-x64-msi',
  'win32-x86':'win-x86-msi',
  'darwin-x64':'osx-x64-pkg',//darwin is os name for osx
  'darwin-x86':'osx-x86-tar',
  'linux-x64':'linux-x64',
  'linux-x86':'linux-x86',
  'sunos-x64':'sunos-x64',
  'sunos-x86':'sunos-x86'
}
$ npm -v
8.5.5

$ uname -a
Darwin MBP 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64
@MR-BH
Copy link

MR-BH commented Jul 8, 2022

The same problem, don't support mac os m1(darwin-arm64), any solution?

@dogcat-ux
Copy link

dogcat-ux commented Jan 14, 2023

The same problem in mac os m2, any solution?

@ben-gryps
Copy link

Same issue on m1-max

@yuanyuanbyte
Copy link

Same issue on m1-pro, any solution?

@beahuszar
Copy link

I tried downloading osx-x64-pkg and it seems to be working. Just edited the node-nightly-version/index.js file as below:

module.exports = () => nightlyVersions()
  .then(versions => versions['osx-x64-pkg'].version);

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

6 participants