Skip to content

Commit 8376ed2

Browse files
authored
Merge pull request #3 from proofcarryingdata/vzheng/fix-fastfile-build
Fix fastfile build errors
2 parents e565105 + 1b07523 commit 8376ed2

3 files changed

Lines changed: 58 additions & 14 deletions

File tree

apps/gpc-prover-client/next.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
/** @type {import('next').NextConfig} */
2+
23
module.exports = {
34
transpilePackages: ["@repo/ui"],
45
webpack: (config, { isServer }) => {
56
if (!isServer) {
7+
// required for fastfile
8+
// fastfile uses node modules "fs", "constants",
9+
// and global "process" (process.browser)
10+
// see details here: https://github.com/proofcarryingdata/zukyc/pull/3
611
config.resolve.fallback = {
712
fs: false
813
};
14+
config.resolve.alias = {
15+
constants: require.resolve(
16+
"rollup-plugin-node-polyfills/polyfills/constants"
17+
),
18+
process: "process/browser"
19+
};
920
}
1021

1122
return config;

apps/gpc-prover-client/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"@pcd/gpc": "^0.0.3",
1313
"@pcd/pod": "^0.1.2",
1414
"@semaphore-protocol/identity": "^3.15.2",
15-
"fastfile": "git+https://github.com/iden3/fastfile.git",
1615
"next": "^14.1.1",
1716
"react": "^18.2.0",
18-
"react-dom": "^18.2.0"
17+
"react-dom": "^18.2.0",
18+
"rollup-plugin-node-polyfills": "^0.2.1"
1919
},
2020
"devDependencies": {
2121
"@next/eslint-plugin-next": "^14.1.1",
@@ -28,8 +28,5 @@
2828
"eslint": "^8.57.0",
2929
"tailwindcss": "^3.4.4",
3030
"typescript": "^5.3.3"
31-
},
32-
"resolutions": {
33-
"@pcd/gpcircuits/**/fastfile": "git+https://github.com/iden3/fastfile.git"
3431
}
3532
}

yarn.lock

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,9 @@
726726
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
727727

728728
"@types/lodash@^4.17.1":
729-
version "4.17.5"
730-
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04"
731-
integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==
729+
version "4.17.6"
730+
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.6.tgz#193ced6a40c8006cfc1ca3f4553444fb38f0e543"
731+
integrity sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==
732732

733733
"@types/mime@^1":
734734
version "1.3.5"
@@ -2528,6 +2528,11 @@ estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0:
25282528
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
25292529
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
25302530

2531+
estree-walker@^0.6.1:
2532+
version "0.6.1"
2533+
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
2534+
integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==
2535+
25312536
esutils@^2.0.2:
25322537
version "2.0.3"
25332538
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
@@ -2627,12 +2632,8 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6:
26272632

26282633
26292634
version "0.0.20"
2630-
resolved "https://github.com/iden3/fastfile.git#5dd61839976b576f85d3784a6d55c64c3c64408d"
2631-
2632-
"fastfile@ssh://[email protected]:iden3/fastfile.git":
2633-
version "0.0.20"
2634-
uid "5dd61839976b576f85d3784a6d55c64c3c64408d"
2635-
resolved "ssh://[email protected]:iden3/fastfile.git#5dd61839976b576f85d3784a6d55c64c3c64408d"
2635+
resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.20.tgz#794a143d58cfda2e24c298e5ef619c748c8a1879"
2636+
integrity sha512-r5ZDbgImvVWCP0lA/cGNgQcZqR+aYdFx3u+CtJqUE510pBUVGMn4ulL/iRTI4tACTYsNJ736uzFxEBXesPAktA==
26362637

26372638
fastq@^1.6.0:
26382639
version "1.17.1"
@@ -3764,6 +3765,13 @@ lru-cache@^7.14.1:
37643765
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89"
37653766
integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==
37663767

3768+
magic-string@^0.25.3:
3769+
version "0.25.9"
3770+
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c"
3771+
integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==
3772+
dependencies:
3773+
sourcemap-codec "^1.4.8"
3774+
37673775
make-error@^1.1.1:
37683776
version "1.3.6"
37693777
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
@@ -4721,6 +4729,29 @@ rimraf@^3.0.0, rimraf@^3.0.2:
47214729
dependencies:
47224730
glob "^7.1.3"
47234731

4732+
rollup-plugin-inject@^3.0.0:
4733+
version "3.0.2"
4734+
resolved "https://registry.yarnpkg.com/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz#e4233855bfba6c0c12a312fd6649dff9a13ee9f4"
4735+
integrity sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==
4736+
dependencies:
4737+
estree-walker "^0.6.1"
4738+
magic-string "^0.25.3"
4739+
rollup-pluginutils "^2.8.1"
4740+
4741+
rollup-plugin-node-polyfills@^0.2.1:
4742+
version "0.2.1"
4743+
resolved "https://registry.yarnpkg.com/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz#53092a2744837164d5b8a28812ba5f3ff61109fd"
4744+
integrity sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==
4745+
dependencies:
4746+
rollup-plugin-inject "^3.0.0"
4747+
4748+
rollup-pluginutils@^2.8.1:
4749+
version "2.8.2"
4750+
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
4751+
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
4752+
dependencies:
4753+
estree-walker "^0.6.1"
4754+
47244755
run-async@^2.4.0:
47254756
version "2.4.1"
47264757
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
@@ -4990,6 +5021,11 @@ source-map@^0.6.1, source-map@~0.6.1:
49905021
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
49915022
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
49925023

5024+
sourcemap-codec@^1.4.8:
5025+
version "1.4.8"
5026+
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"
5027+
integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
5028+
49935029
spdx-correct@^3.0.0:
49945030
version "3.2.0"
49955031
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c"

0 commit comments

Comments
 (0)