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

Cannot install on MacOS arm64 / Apple Silicon #773

Open
mayel opened this issue Dec 17, 2021 · 4 comments
Open

Cannot install on MacOS arm64 / Apple Silicon #773

mayel opened this issue Dec 17, 2021 · 4 comments

Comments

@mayel
Copy link

mayel commented Dec 17, 2021

What's the problem you want solved?

npm -g install fraction/oasis

npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated debug@4.1.1: 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 highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest
npm WARN deprecated emoji-named-characters@1.0.2: This package is no longer maintained
npm ERR! code 1
npm ERR! path /opt/homebrew/lib/node_modules/@fraction/oasis/node_modules/ssb-validate2-rsjs-node
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! node:internal/errors:464
npm ERR!     ErrorCaptureStackTrace(err);
npm ERR!     ^
npm ERR!
npm ERR! Error: spawn nj-cli ENOENT
npm ERR!     at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
npm ERR!     at onErrorNT (node:internal/child_process:475:16)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
npm ERR!   errno: -2,
npm ERR!   code: 'ENOENT',
npm ERR!   syscall: 'spawn nj-cli',
npm ERR!   path: 'nj-cli',
npm ERR!   spawnargs: [ 'build', '--release' ]
npm ERR! }
npm ERR!
npm ERR! Node.js v17.2.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2021-12-17T07_54_55_007Z-debug.log

Is there a solution you'd like to recommend?

Make it installable/runnable on this arch.

@mayel
Copy link
Author

mayel commented Dec 17, 2021

And this is what I get when trying to follow docs/install.md instead:

 > npm install --only=prod

npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated debug@4.1.1: 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 highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest
npm WARN deprecated emoji-named-characters@1.0.2: This package is no longer maintained
npm WARN deprecated formidable@1.2.2: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau

added 772 packages, and audited 773 packages in 1m

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

9 vulnerabilities (8 moderate, 1 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.


> node .
  oasis No configuration file found at /Users/me/Library/Preferences/oasis/default.json, using built-in default values. +0ms
  oasis No custom style file found at /Users/me/Library/Preferences/oasis/custom-style.css, ignoring this stylesheet. +0ms
error loading sodium bindings: Cannot find module 'sodium-native'
Require stack:
- /Users/me/Applications/oasis/node_modules/chloride/bindings.js
- /Users/me/Applications/oasis/node_modules/chloride/index.js
- /Users/me/Applications/oasis/node_modules/ssb-client/node_modules/ssb-keys/index.js
- /Users/me/Applications/oasis/node_modules/ssb-client/index.js
- /Users/me/Applications/oasis/src/ssb/index.js
- /Users/me/Applications/oasis/src/index.js
falling back to javascript version.
error loading sodium bindings: Cannot find module 'sodium-native'
Require stack:
- /Users/me/Applications/oasis/node_modules/ssb-keys/node_modules/chloride/bindings.js
- /Users/me/Applications/oasis/node_modules/ssb-keys/node_modules/chloride/index.js
- /Users/me/Applications/oasis/node_modules/ssb-keys/index.js
- /Users/me/Applications/oasis/src/ssb/index.js
- /Users/me/Applications/oasis/src/index.js
falling back to javascript version.
  oasis Listening on http://localhost:3000 +1s
  oasis Starting Scuttlebutt service +0ms
about-name-warmup: 5.941ms
TypeError: ssb.friends.get is not a function
    at socialFilter (/Users/me/Applications/oasis/src/models.js:669:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async getMessages (/Users/me/Applications/oasis/src/models.js:630:31)
    at async Object.mentionsMe (/Users/me/Applications/oasis/src/models.js:957:24)
    at async mentions (/Users/me/Applications/oasis/src/index.js:784:24)
    at async /Users/me/Applications/oasis/src/index.js:788:16
    at async middleware (/Users/me/Applications/oasis/src/index.js:1085:7)
    at async /Users/me/Applications/oasis/src/index.js:1063:5
    at async /Users/me/Applications/oasis/src/index.js:1058:5
    at async /Users/me/Applications/oasis/src/http.js:113:5

@mayel
Copy link
Author

mayel commented Dec 17, 2021

After installing npm install sodium-native those errors go away but not the TypeError

@mayel
Copy link
Author

mayel commented Dec 17, 2021

Ok after running npm install ssb-friends@4.4.7 from #718 it runs, so the only thing left is fixing the main install method.

@mayel
Copy link
Author

mayel commented Dec 17, 2021

Hmm I get this as soon as it launches though:

> node .
  oasis No configuration file found at /Users/me/Library/Preferences/oasis/default.json, using built-in default values. +0ms
  oasis No custom style file found at /Users/me/Library/Preferences/oasis/custom-style.css, ignoring this stylesheet. +0ms
  oasis Listening on http://localhost:3000 +362ms
/Users/me/Applications/oasis/src/index.js:132
    throw err;
    ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v17.2.0

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

No branches or pull requests

1 participant