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

Issues installing it globally from npm #15

Closed
NelsonGaldeman opened this issue May 4, 2023 · 13 comments · Fixed by #16
Closed

Issues installing it globally from npm #15

NelsonGaldeman opened this issue May 4, 2023 · 13 comments · Fixed by #16

Comments

@NelsonGaldeman
Copy link

NelsonGaldeman commented May 4, 2023

I'm trying to install it locally by running npm i @lens-protocol/momoka -g but it crashes, here is console output:

➜  /Users/nelson/ npm i @lens-protocol/momoka -g
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm ERR! code 127
npm ERR! path /usr/local/lib/node_modules/@lens-protocol/momoka
npm ERR! command failed
npm ERR! command sh -c npx only-allow pnpm
npm ERR! sh: only-allow: command not found

I found out it's requiring only-allow package but it's not installing it.

Running on macOS 13.3.1 (22E261)

@joshstevens19
Copy link
Member

Running it using npx works for you?

@NelsonGaldeman
Copy link
Author

You mean running only-allow with npx? I didn't even have the repo cloned at that time. I actually added only-allow manually but then I got other errors, didn't have time to dig into what the new ones were.

Just cloned the repo and did pnpm install but got more errors:

│ error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-cl
│ gyp info ok 
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@9.3.1
│ gyp info using node@19.8.1 | darwin | x64
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│   CXX(target) Release/obj.target/node_libcurl/src/node_libcurl.o
│ clang: error: no such file or directory: '/usr/include'
│ make: *** [Release/obj.target/node_libcurl/src/node_libcurl.o] Error 1
│ gyp ERR! build error 
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/pnpm/7.29.1/libexec/dist/node_modules/nod
│ gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
│ gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
│ gyp ERR! System Darwin 22.4.0
│ gyp ERR! command "/usr/local/Cellar/node/19.8.1/bin/node" "/usr/local/Cellar/pnpm/7.29.1/libexec/dist/
│ gyp ERR! cwd /Users/nelson/lens-protocol/momoka/node_modules/.pnpm/node-libcurl@3.0.0_bluebird@3.7.2/n
│ gyp ERR! node -v v19.8.1
│ gyp ERR! node-gyp -v v9.3.1
│ gyp ERR! not ok 
│ node-pre-gyp ERR! build error 
│ node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/19.8.1/bin/node /usr/local/Ce
│ node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/nelson/lens-protocol/momoka/node_modul
│ node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
│ node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
│ node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
│ node-pre-gyp ERR! System Darwin 22.4.0
│ node-pre-gyp ERR! command "/usr/local/Cellar/node/19.8.1/bin/node" "/Users/nelson/lens-protocol/momoka
│ node-pre-gyp ERR! cwd /Users/nelson/lens-protocol/momoka/node_modules/.pnpm/node-libcurl@3.0.0_bluebir
│ node-pre-gyp ERR! node -v v19.8.1
│ node-pre-gyp ERR! node-pre-gyp -v v1.0.10
│ node-pre-gyp ERR! not ok 
│ Failed to execute '/usr/local/Cellar/node/19.8.1/bin/node /usr/local/Cellar/pnpm/7.29.1/libexec/dist/n
└─ Failed in 4.3s at /Users/nelson/lens-protocol/momoka/node_modules/.pnpm/node-libcurl@3.0.0_bluebird@3.7.2/node_modules/node-libcurl
 ELIFECYCLE  Command failed with exit code 1.

@joshstevens19
Copy link
Member

joshstevens19 commented May 7, 2023

Not I mean using npx, if you run the commands using npx does it all work or same error?

@NelsonGaldeman
Copy link
Author

Using npx I get the same error sh: only-allow: command not found.

If I install only-allow manually, I also get the same errors:

➜  /Users/nelson  npx npm  i @lens-protocol/momoka -g
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/node_libcurl.o
npm ERR! Failed to execute '/usr/local/Cellar/node/19.8.1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10
npm ERR! node-pre-gyp info using node@19.8.1 | darwin | x64
npm ERR! node-pre-gyp info check checked for "/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/lib/binding/node_libcurl.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/JCMais/node-libcurl/releases/download/v3.0.0/node_libcurl-v3.0.0-node-v111-darwin-x64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/JCMais/node-libcurl/releases/download/v3.0.0/node_libcurl-v3.0.0-node-v111-darwin-x64-unknown.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for node-libcurl@3.0.0 and node@19.8.1 (node-v111 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/JCMais/node-libcurl/releases/download/v3.0.0/node_libcurl-v3.0.0-node-v111-darwin-x64-unknown.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@19.8.1 | darwin | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@19.8.1 | darwin | x64
npm ERR! gyp info find Python using Python version 3.7.9 found at "/usr/local/bin/python3"
npm ERR! gyp info spawn /usr/local/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/nelson/Library/Caches/node-gyp/19.8.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/nelson/Library/Caches/node-gyp/19.8.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/nelson/Library/Caches/node-gyp/19.8.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic: can't open file: /usr/lib/libcurl.dylib (No such file or directory)
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@19.8.1 | darwin | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! clang: error: no such file or directory: '/usr/include'
npm ERR! make: *** [Release/obj.target/node_libcurl/src/node_libcurl.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.4.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/19.8.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v111"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl
npm ERR! gyp ERR! node -v v19.8.1
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/19.8.1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm ERR! node-pre-gyp ERR! System Darwin 22.4.0
npm ERR! node-pre-gyp ERR! command "/usr/local/Cellar/node/19.8.1/bin/node" "/usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl
npm ERR! node-pre-gyp ERR! node -v v19.8.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

@desfero
Copy link
Collaborator

desfero commented May 9, 2023

@joshstevens19 should we remove preinstall script from a published package, as it seems to be causing the problems?
https://github.com/lens-protocol/momoka/blob/master/package.json#LL35C39-L35C39

@joshstevens19
Copy link
Member

@desfero for sure do a PR we merge and deploy

@joshstevens19
Copy link
Member

Will deploy in morning and you can retest @NelsonGaldeman

Thanks @desfero

@NelsonGaldeman
Copy link
Author

Will deploy in morning and you can retest @NelsonGaldeman

Thanks @desfero

It wasn't deployed yet, was it? Checking here: https://www.npmjs.com/package/@lens-protocol/momoka

@joshstevens19
Copy link
Member

Yeah sorry been a crazy weekend il deploy this next time I go back on PC! 👍 will put it on here once done

@joshstevens19
Copy link
Member

release 1.1.1 let us know it works for you

@NelsonGaldeman
Copy link
Author

@joshstevens19 it's not failing for only-allow package now so that's good. Still failing though. I will create an error-specific issue to follow up. Thanks

@desfero
Copy link
Collaborator

desfero commented May 17, 2023

Gm @NelsonGaldeman, i can't see any new issue reported so can i assume the problem with running Momoka is now fixed?
If not, would be very happy to help with finding and fixing the issue.

@NelsonGaldeman
Copy link
Author

Hi @desfero, haven't had time to open an issue. I will do now.

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

Successfully merging a pull request may close this issue.

3 participants