zkemail / zk-regex

A library to do regex verification in circom, adapted from the original zk-email. It additionally generates lookup tables for halo2-regex.
GNU General Public License v3.0
79 stars 27 forks source link

README: add notes on yarn and circom #46

Closed matthiasgeihs closed 10 months ago

matthiasgeihs commented 10 months ago

was trying to build and test.

suggesting to add notes on this to the README.

Divide-By-0 commented 10 months ago

was trying to build and test.

  • had yarn v3, but needed v1.
  • testing requires circom

suggesting to add notes on this to the README.

Great notes, thanks for the PR! I'm confused though since I have the latest yarn and it works fine. What was the yarn error you were getting?

matthiasgeihs commented 10 months ago

Which version are you on?

When I use v3.7.0, I get the following two errors:

# This file contains the result of Yarn building a package (@zk-email/zk-regex@workspace:.)
# Script name: install

Unknown Syntax Error: Command not found; did you mean:

$ yarn workspaces list [--since] [-R,--recursive] [--no-private] [-v,--verbose] [--json]
While running workspaces -pt run install
# This file contains the result of Yarn building a package (@zk-email/zk-regex-compiler@workspace:packages/compiler)
# Script name: install

                This is not the tsc command you are looking for                

To get access to the TypeScript compiler, tsc, from the command line either:

- Use npm install typescript to first add TypeScript to your project before using npx
- Use yarn to avoid accidentally running code from un-installed packages

> @zk-email/zk-regex-compiler@1.0.8 build-release
> npx tsc && npm run build -- --release

                This is not the tsc command you are looking for                

To get access to the TypeScript compiler, tsc, from the command line either:

- Use npm install typescript to first add TypeScript to your project before using npx
- Use yarn to avoid accidentally running code from un-installed packages
npm ERR! Lifecycle script `build-release` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @zk-email/zk-regex-compiler@1.0.8 
npm ERR!   at location: [...]/zk-regex/packages/compiler

Once I do yarn set version classic (which sets v1.22.19), things are working fine.

Divide-By-0 commented 10 months ago

Good catch, I was also on yarn classic. I added yarn 1 to the package.json engines as well.