Coder Social home page Coder Social logo

lens-protocol / momoka Goto Github PK

View Code? Open in Web Editor NEW
251.0 251.0 106.0 24.94 MB

Open source code showing how you can verify the DA claims are true

License: MIT License

TypeScript 76.25% JavaScript 0.88% Dockerfile 0.06% HTML 0.25% CSS 0.13% Rust 22.43%

momoka's Introduction

                                              @@@@@@@@@
                                        @@@@@@@@@@@@@@@@@@@@@
                                    @@@@@@@@@@@@@@@@@@@@@@@@@@@@
                                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
              @@@@@@@@@@@       @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@      @@@@@@@@@@@
        @@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@              @@@@@@@@@@@@@@              @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@          @@@@@@@   @@@@@@@@@         @@@@@@    @@@@@@@@@@@@@@@@@@@@@@@@@
  @@@@@@@@@@@@@@@@@@@@@@  @@        @@@@@@@@  @@@@@@   @       @@@@@@@@   @@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Lens Protocol

The Lens Protocol is a decentralized, non-custodial social graph. Lens implements unique, on-chain social interaction mechanisms analogous to commonly understood Web2 social media interactions, but significantly expanded with unique functionality that empower communities to form and participants to own their own social graph.

Setup

1. Clone the Repository

git clone [email protected]:lens-protocol/core.git

2. Install Foundry

Follow the instructions from their repository or just do:

curl -L https://foundry.paradigm.xyz | bash
foundryup

3. Install dependencies in submodules

You can do it either with forge:

forge install

or directly with git:

git submodule update --init --recursive

4. Create Your .env File

Copy the .env.example file into .env and fill the necessary fields:

MNEMONIC=
POLYGON_RPC_URL=
MUMBAI_RPC_URL=
KOVAN_RPC_URL=
ROPSTEN_RPC_URL=
MAINNET_RPC_URL=
BLOCK_EXPLORER_KEY=
TENDERLY_PROJECT=
TENDERLY_USERNAME=
TENDERLY_FORK_ID=
TENDERLY_HEAD_ID=

# Forking setup (uncomment to test using a fork)
# TESTING_FORK=mainnet
# TESTING_FORK_CURRENT_VERSION=1
# TESTING_FORK_BLOCK=45504400

If you just want to test locally without a fork, then you can skip this step.

5. Build

You can compile the project using:

forge build

You may notice a warning about some files exceeding code size.

To avoid the warning, you can compile Via IR but it will take more time:

forge build --via-ir

6. Test

You can run unit tests using:

forge test

To run the tests on a fork you need to fill the .env file from the step above, and uncomment the TESTING_FORK variables.

7. Coverage

You can run coverage using:

forge coverage

momoka's People

Contributors

absis avatar dabit3 avatar desfero avatar evalir avatar haardikk21 avatar joshstevens19 avatar juangm avatar kvk-code avatar makemake-kbo avatar nelsonrodmar avatar seanmc9 avatar sirsoth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

momoka's Issues

`GLIBCXX_3.4.26' not found

I'm having problems getting the verifier started, seems like because GLIBCXX v3.4.26 can't be found.

Errror Message:

seliqui@32709:~/momoka-verifier$ momoka --node 'https://polygon-mainnet.g.alchemy.com/v2/VD_EooBfohR2pk3abgpIpx5jVfhLwi-w' --environment='POLYGON' --concurrency=20 --fromHead=false
node:internal/modules/cjs/loader:1338
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/seliqui/.nvm/versions/node/v18.16.0/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/lib/binding/node_libcurl.node)
    at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/home/seliqui/.nvm/versions/node/v18.16.0/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/dist/Easy.js:5:18)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/home/seliqui/.nvm/versions/node/v18.16.0/lib/node_modules/@lens-protocol/momoka/node_modules/node-libcurl/dist/Curl.js:17:16)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.16.0

Process:
1.) Installed the Momoka Package via npm i @lens-protocol/momoka -g
2.) Tried running it via momoka --node 'https://polygon-mainnet.g.alchemy.com/v2/VD_EooBfohR2pk3abgpIpx5jVfhLwi-w' --environment='POLYGON' --concurrency=20 --fromHead=false

Attempts to fix it myself:

  • sudo apt update and sudo apt upgrade
  • sudo apt install build-essential
  • Switched NodeJS Versions, from an older one (16x) to recent LTS (18x) to newest (20.x)
  • Directly sudo apt install libstdc++6 (which returns that newest version of libstdc++6 is already installed - 8.3.0-6).

Checking the installed versions of libstdc++ via strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX returns:

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_DEBUG_MESSAGE_LENGTH

Which miss the needed 3.4.26 version ^^

Some additional infos:
nvm version: 0.38.0
active node version: v18.16.0
libstdc++6 version: 8.3.0-6
System: Debian 10 (Buster) / Server

Why the pubIds of different threads are not unique?

Hello Lens-Team and Momoka-Team

I posted three threads through Lenster and found that they were all processed by Momoka.

According to Momoka's documentation, the ID of a thread is equal to the profileId + pubId + DA + first eight characters of the dataAvailabilityId.

Here, pubId is essentially the number of threads previously posted by my current profile recorded on the Polygon chain.

However, the pubId of the three consecutive threads I posted was the same.

I don't know whether the threads processed by Momoka will be synchronized to Polygon. Based on simple testing, it seems that they are not synchronized. Could this be the reason why the number of threads on Polygon always stays at a certain value, increasing by 1 each time a new thread is posted, eventually resulting in the same pubId for all threads I posted?

I would like to understand what happened

Why the pubIds of different threads are not unique?
And why the threads processed by Momoka are not ultimately synchronized to Polygon?

I'm not sure if my explanation is clear enough for you to understand.

Issues installing it globally from npm

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/[email protected]: 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)

How to know mirror from someone's mirror?

Hi there. Suppose I post something through Momoka.

PersonA mirrors it from my profile page
PersonB mirrors it from PersonA's profile page
PersonC mirrors it from the PersonB profile page

We cannot know if C's mirror is from B's mirror. Is that right?

I query the Momoka artx and proofs but cannot figure out that.

Failed to install on macOS

Hi guys, I'm running the npm command and I'm getting some errors:

macOS: 13.3.1

โžœ  /Users/nelson  node --version
v19.8.1
โžœ  /Users/nelson  npm i @lens-protocol/momoka -g
npm WARN deprecated @npmcli/[email protected]: 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 [email protected]
npm ERR! node-pre-gyp info using [email protected] | 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 [email protected] and [email protected] (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 [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | 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 [email protected]
npm ERR! gyp info using [email protected] | 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

Error deploying with npm

npm WARN config init.module Use --init-module instead.
/root/node_modules/@lens-protocol/momoka/lib/graphql/urql.client.js:9
fetch: fetch,
^

ReferenceError: fetch is not defined
at Object. (/root/node_modules/@lens-protocol/momoka/lib/graphql/urql.client.js:9:12)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object. (/root/node_modules/@lens-protocol/momoka/lib/input-output/bundlr/get-data-availability-transactions.api.js:5:23)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)

Can the project owner provide a docker image for momoka users to easily deploy?

bug: Docker build failing on `npm install pnpm`

I run into this error on the RUN npm install pnpm of the Dockerfile both when I attempt to run docker build -t da-service . locally as well as with VS Code Dev Containers:

ERROR: failed to solve: process "/bin/sh -c npm install pnpm" did not complete successfully: exit code: 1
Details
[+] Building 72.0s (11/14)                                                                                                                                   
 => [internal] load .dockerignore                                                                                                                       0.0s
 => => transferring context: 123B                                                                                                                       0.0s
 => [internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 429B                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/node:18.14-alpine                                                                                    1.1s
 => [ 1/10] FROM docker.io/library/node:18.14-alpine@sha256:f8a51c36b0be7434bbf867d4a08decf0100e656203d893b9b0f8b1fe9e40daea                            0.0s
 => [internal] load build context                                                                                                                       0.0s
 => => transferring context: 383.18kB                                                                                                                   0.0s
 => CACHED [ 2/10] WORKDIR /usr/src/app                                                                                                                 0.0s
 => CACHED [ 3/10] COPY package*.json ./                                                                                                                0.0s
 => CACHED [ 4/10] COPY tsconfig.json ./                                                                                                                0.0s
 => CACHED [ 5/10] COPY src ./src                                                                                                                       0.0s
 => CACHED [ 6/10] COPY .env ./                                                                                                                         0.0s
 => ERROR [ 7/10] RUN npm install pnpm                                                                                                                 70.8s
------
 > [ 7/10] RUN npm install pnpm:
#0 62.30 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.
#0 62.61 npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
#0 68.46 npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
#0 70.12 npm notice 
#0 70.12 npm notice New minor version of npm available! 9.5.0 -> 9.6.5
#0 70.12 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.5>
#0 70.12 npm notice Run `npm install -g [email protected]` to update!
#0 70.12 npm notice 
#0 70.12 npm ERR! code 1
#0 70.12 npm ERR! path /usr/src/app/node_modules/node-libcurl
#0 70.12 npm ERR! command failed
#0 70.12 npm ERR! command sh -c node-pre-gyp install --fallback-to-build
#0 70.12 npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/src/app/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/usr/src/app/node_modules/node-libcurl/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
#0 70.12 npm ERR! node-pre-gyp info it worked if it ends with ok
#0 70.12 npm ERR! node-pre-gyp info using [email protected]
#0 70.12 npm ERR! node-pre-gyp info using [email protected] | linux | arm64
#0 70.12 npm ERR! node-pre-gyp info check checked for "/usr/src/app/node_modules/node-libcurl/lib/binding/node_libcurl.node" (not found)
#0 70.12 npm ERR! node-pre-gyp http GET https://github.com/JCMais/node-libcurl/releases/download/v3.0.0/node_libcurl-v3.0.0-node-v108-linux-arm64-musl.tar.gz
#0 70.12 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-v108-linux-arm64-musl.tar.gz 
#0 70.12 npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, musl) (falling back to source compile with node-gyp) 
#0 70.12 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-v108-linux-arm64-musl.tar.gz 
#0 70.12 npm ERR! gyp info it worked if it ends with ok
#0 70.12 npm ERR! gyp info using [email protected]
#0 70.12 npm ERR! gyp info using [email protected] | linux | arm64
#0 70.12 npm ERR! gyp info ok 
#0 70.12 npm ERR! gyp info it worked if it ends with ok
#0 70.12 npm ERR! gyp info using [email protected]
#0 70.12 npm ERR! gyp info using [email protected] | linux | arm64
#0 70.12 npm ERR! gyp ERR! find Python 
#0 70.12 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
#0 70.12 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
#0 70.12 npm ERR! gyp ERR! find Python checking if "python3" can be used
#0 70.12 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
#0 70.12 npm ERR! gyp ERR! find Python checking if "python" can be used
#0 70.13 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
#0 70.13 npm ERR! gyp ERR! find Python 
#0 70.13 npm ERR! gyp ERR! find Python **********************************************************
#0 70.13 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
#0 70.13 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#0 70.13 npm ERR! gyp ERR! find Python you can try one of the following options:
#0 70.13 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#0 70.13 npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
#0 70.13 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
#0 70.13 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
#0 70.13 npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#0 70.13 npm ERR! gyp ERR! find Python For more information consult the documentation at:
#0 70.13 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#0 70.13 npm ERR! gyp ERR! find Python **********************************************************
#0 70.13 npm ERR! gyp ERR! find Python 
#0 70.13 npm ERR! gyp ERR! configure error 
#0 70.13 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
#0 70.13 npm ERR! gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#0 70.13 npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#0 70.13 npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#0 70.13 npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#0 70.13 npm ERR! gyp ERR! stack     at exithandler (node:child_process:427:5)
#0 70.13 npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:439:5)
#0 70.13 npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#0 70.13 npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:289:12)
#0 70.13 npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:476:16)
#0 70.13 npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
#0 70.13 npm ERR! gyp ERR! System Linux 5.15.49-linuxkit
#0 70.13 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/src/app/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/usr/src/app/node_modules/node-libcurl/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
#0 70.13 npm ERR! gyp ERR! cwd /usr/src/app/node_modules/node-libcurl
#0 70.13 npm ERR! gyp ERR! node -v v18.14.2
#0 70.13 npm ERR! gyp ERR! node-gyp -v v9.3.1
#0 70.13 npm ERR! gyp ERR! not ok 
#0 70.13 npm ERR! node-pre-gyp ERR! build error 
#0 70.13 npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/src/app/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/usr/src/app/node_modules/node-libcurl/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
#0 70.13 npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/src/app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
#0 70.13 npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#0 70.13 npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
#0 70.13 npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
#0 70.13 npm ERR! node-pre-gyp ERR! System Linux 5.15.49-linuxkit
#0 70.13 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/src/app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#0 70.13 npm ERR! node-pre-gyp ERR! cwd /usr/src/app/node_modules/node-libcurl
#0 70.13 npm ERR! node-pre-gyp ERR! node -v v18.14.2
#0 70.13 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
#0 70.13 npm ERR! node-pre-gyp ERR! not ok
#0 70.13 
#0 70.13 npm ERR! A complete log of this run can be found in:
#0 70.13 npm ERR!     /root/.npm/_logs/2023-04-29T11_25_18_036Z-debug-0.log
------
Dockerfile:11
--------------------
   9 |     
  10 |     # Install pnpm locally in your project directory
  11 | >>> RUN npm install pnpm
  12 |     
  13 |     # Install project dependencies using pnpm
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install pnpm" did not complete successfully: exit code: 1

However, when I use

FROM mcr.microsoft.com/devcontainers/typescript-node:18 as base

from VS Code's Dev Container image repository at the top of the Dockerfile instead of

FROM node:18.14-alpine as base

the build succeeds (both locally and in Dev Containers).

Details
[+] Building 180.1s (15/15) FINISHED                                                                                                   
 => [internal] load .dockerignore                                                                                                 0.0s
 => => transferring context: 123B                                                                                                 0.0s
 => [internal] load build definition from Dockerfile                                                                              0.0s
 => => transferring dockerfile: 462B                                                                                              0.0s
 => [internal] load metadata for mcr.microsoft.com/devcontainers/typescript-node:18                                               0.9s
 => [ 1/10] FROM mcr.microsoft.com/devcontainers/typescript-node:18@sha256:c258d970c416c860c973e1e8cd4b1c8e8245f187374dd15904ef  13.3s
 => => resolve mcr.microsoft.com/devcontainers/typescript-node:18@sha256:c258d970c416c860c973e1e8cd4b1c8e8245f187374dd15904ef1f4  0.0s
 => => sha256:0f398117670bb193f5c6cb1afff2f10d6904e5689050acb5cd7f21d6c7c73183 5.05kB / 5.05kB                                    0.0s
 => => sha256:80e7bb3929f7456a5e49b259d265f6c30093f52eea2f07aaf726ff784c9db628 22.34kB / 22.34kB                                  0.0s
 => => sha256:5884e7f2c8c61aa845de4902fc29639b58861ae6c2d80bafe82082c0456c0740 5.15MB / 5.15MB                                    1.4s
 => => sha256:dc80b8cdbfd36cb20231d807a50d704945d1df4da8f6e23197ccfcb629970491 53.71MB / 53.71MB                                  1.3s
 => => sha256:c258d970c416c860c973e1e8cd4b1c8e8245f187374dd15904ef1f4893da1069 1.61kB / 1.61kB                                    0.0s
 => => sha256:1b792b01ed3c8dc1488cd8aac41ab7d49bb17f3fa22b2e6c846078cec81a1c00 10.87MB / 10.87MB                                  0.3s
 => => sha256:8f993d5b17f32f4b8a535c25e182e5d8412625beee450e513ca57036e8fdd6dc 54.68MB / 54.68MB                                  1.2s
 => => sha256:c26edf98ece5babdb6b65e76738cef2c2d05e7075161753d3ba95cd84480d211 189.73MB / 189.73MB                                5.5s
 => => sha256:ef4553a29827be949323a49bbe126aac00893203a3234abe3a2915aa4b0b768a 4.20kB / 4.20kB                                    1.4s
 => => extracting sha256:dc80b8cdbfd36cb20231d807a50d704945d1df4da8f6e23197ccfcb629970491                                         1.3s
 => => sha256:14531ce9f0a46be86d89363abbf533499226c7734e56c3fbb7d70a8da9562be7 2.28MB / 2.28MB                                    1.8s
 => => sha256:f12d0fbf1676444f72f7a86719bd3c8a5ef70c77eaee331304d13da832785a54 45.58MB / 45.58MB                                  2.1s
 => => sha256:5f64eb351b344b535e5676014358c3045349fae2d10e4d45048067a26b17229c 452B / 452B                                        1.9s
 => => sha256:ab52160beb8c299b9cbc1871d4437a0d0078c195ada9dea92f2a53a82253e3c6 615B / 615B                                        2.0s
 => => sha256:e0f12e4dc616e9fec18d255bce2751e03ef5960f80ce27de2576ec82c7193135 152B / 152B                                        2.1s
 => => sha256:a33a868bf74e055264aa2e67907b2ee45baad5137175331a231f7124bc6bddce 6.26MB / 6.26MB                                    2.3s
 => => sha256:d9cb5ee1791cf6684e30ed87c27271dd350924a08a24aed403a26a8a0bce061c 424B / 424B                                        2.2s
 => => sha256:23c5221cc21eb8202f5b0db2749d236d2e521f59a415d6a0cc3d80bee7262403 140B / 140B                                        2.3s
 => => sha256:10036c11447f8cc70b7d8c0cc445c09566d0294f8dde91d4947e646fc418c1e0 226B / 226B                                        2.5s
 => => sha256:7c1be147ae7daee0b71b616dd01799d8fd2a6ea30a06a75ed75a6c9162e16162 242B / 242B                                        2.5s
 => => sha256:cc2dab73aa3b44c7df8ab5a98761184bc50e0ce81ce816def15ebbd45c6561dd 63.84MB / 63.84MB                                  3.5s
 => => sha256:b987a2df6707ff61a783e9a34937aa492905afe0ea58d46c30d30f4d410b790a 45.42MB / 45.42MB                                  5.3s
 => => extracting sha256:5884e7f2c8c61aa845de4902fc29639b58861ae6c2d80bafe82082c0456c0740                                         0.1s
 => => extracting sha256:1b792b01ed3c8dc1488cd8aac41ab7d49bb17f3fa22b2e6c846078cec81a1c00                                         0.2s
 => => extracting sha256:8f993d5b17f32f4b8a535c25e182e5d8412625beee450e513ca57036e8fdd6dc                                         1.2s
 => => sha256:56c4f704dae79d7c9189f368c3b25cf49a3468f2e52428fe90fd512a2cf60067 7.50MB / 7.50MB                                    3.8s
 => => sha256:4986921bf90f08cb3416b4091551f98b5877239ef0d6ecb4ea15e14f8ffd8576 45.01MB / 45.01MB                                  4.7s
 => => sha256:abb08069452b8612dde53d164d725d549da7499bf3c1a391c6cf00175fa79ecd 431B / 431B                                        4.8s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                                          5.3s
 => => sha256:57ca398a74ea4a23446ebacabc36cc2f55617cf4cbc7b129cb2255984ebab8c2 231B / 231B                                        5.3s
 => => sha256:4a0a367cb9ab2a26403cf52f5c723ab43789ab0af63a8d46b3765d46c0f78e47 61.00MB / 61.00MB                                  6.7s
 => => sha256:36975edf19b3a66496b611274d51b2d10fd73084a97811fcc0e9b37b7d253562 247B / 247B                                        5.5s
 => => extracting sha256:c26edf98ece5babdb6b65e76738cef2c2d05e7075161753d3ba95cd84480d211                                         2.4s
 => => extracting sha256:ef4553a29827be949323a49bbe126aac00893203a3234abe3a2915aa4b0b768a                                         0.0s
 => => extracting sha256:f12d0fbf1676444f72f7a86719bd3c8a5ef70c77eaee331304d13da832785a54                                         0.7s
 => => extracting sha256:14531ce9f0a46be86d89363abbf533499226c7734e56c3fbb7d70a8da9562be7                                         0.1s
 => => extracting sha256:5f64eb351b344b535e5676014358c3045349fae2d10e4d45048067a26b17229c                                         0.0s
 => => extracting sha256:ab52160beb8c299b9cbc1871d4437a0d0078c195ada9dea92f2a53a82253e3c6                                         0.0s
 => => extracting sha256:e0f12e4dc616e9fec18d255bce2751e03ef5960f80ce27de2576ec82c7193135                                         0.0s
 => => extracting sha256:a33a868bf74e055264aa2e67907b2ee45baad5137175331a231f7124bc6bddce                                         0.2s
 => => extracting sha256:d9cb5ee1791cf6684e30ed87c27271dd350924a08a24aed403a26a8a0bce061c                                         0.0s
 => => extracting sha256:23c5221cc21eb8202f5b0db2749d236d2e521f59a415d6a0cc3d80bee7262403                                         0.0s
 => => extracting sha256:10036c11447f8cc70b7d8c0cc445c09566d0294f8dde91d4947e646fc418c1e0                                         0.0s
 => => extracting sha256:7c1be147ae7daee0b71b616dd01799d8fd2a6ea30a06a75ed75a6c9162e16162                                         0.0s
 => => extracting sha256:b987a2df6707ff61a783e9a34937aa492905afe0ea58d46c30d30f4d410b790a                                         0.6s
 => => extracting sha256:cc2dab73aa3b44c7df8ab5a98761184bc50e0ce81ce816def15ebbd45c6561dd                                         0.7s
 => => extracting sha256:56c4f704dae79d7c9189f368c3b25cf49a3468f2e52428fe90fd512a2cf60067                                         0.1s
 => => extracting sha256:4986921bf90f08cb3416b4091551f98b5877239ef0d6ecb4ea15e14f8ffd8576                                         0.7s
 => => extracting sha256:abb08069452b8612dde53d164d725d549da7499bf3c1a391c6cf00175fa79ecd                                         0.0s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                         0.0s
 => => extracting sha256:57ca398a74ea4a23446ebacabc36cc2f55617cf4cbc7b129cb2255984ebab8c2                                         0.0s
 => => extracting sha256:36975edf19b3a66496b611274d51b2d10fd73084a97811fcc0e9b37b7d253562                                         0.0s
 => => extracting sha256:4a0a367cb9ab2a26403cf52f5c723ab43789ab0af63a8d46b3765d46c0f78e47                                         0.7s
 => [internal] load build context                                                                                                 0.0s
 => => transferring context: 383.18kB                                                                                             0.0s
 => [ 2/10] WORKDIR /usr/src/app                                                                                                  1.3s
 => [ 3/10] COPY package*.json ./                                                                                                 0.0s
 => [ 4/10] COPY tsconfig.json ./                                                                                                 0.0s
 => [ 5/10] COPY src ./src                                                                                                        0.0s
 => [ 6/10] COPY .env ./                                                                                                          0.0s
 => [ 7/10] RUN npm install pnpm                                                                                                 81.6s
 => [ 8/10] RUN npx pnpm install                                                                                                 30.0s
 => [ 9/10] RUN chown -R node:node /usr/src/app                                                                                  37.1s
 => [10/10] RUN npm run build                                                                                                    11.1s
 => exporting to image                                                                                                            4.8s
 => => exporting layers                                                                                                           4.8s
 => => writing image sha256:4ad3cecb90c56f2139cbc66447a1c9eb07531b7d0e9257e3d7e614f4a13f9585                                      0.0s
 => => naming to docker.io/library/da-service

And then I can run docker run -d -p 3008:3008 da-service no problem.

Environment

Docker Desktop 4.19.0 on Apple M1 Pro using MacOS Ventura Version 13.3.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.