% NETWORK=localhost yarn dev
Nothing to compile
Nothing to compile
(node:20211) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm/transpile-only", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:20217) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm/transpile-only", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
Deployed at {
chainId: 31337,
verifier: '0x5fbdb2315678afecb367f032d93f642f64180aa3'
}
VITE v5.0.6 ready in 246 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
✘ [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
node_modules/@aztec/bb.js/dest/browser/index.js:2:16426468:
2 │ ...e.hasOwnProperty.call(A,I);var D=E(183),i=(D=await D).Zh,w=D.AL,h=D.i2,o=D.Fr,G=D.ld;export{i a...
╵ ~~~~~
/.../noir-lang/noir-starter/vite-hardhat/node_modules/esbuild/lib/main.js:1650
let error = new Error(text);
^
Error: Build failed with 1 error:
node_modules/@aztec/bb.js/dest/browser/index.js:2:16426468: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
at failureErrorWithLog (.../noir-lang/noir-starter/vite-hardhat/node_modules/esbuild/lib/main.js:1650:15)
at /.../noir-lang/noir-starter/vite-hardhat/node_modules/esbuild/lib/main.js:1058:25
at /.../noir-lang/noir-starter/vite-hardhat/node_modules/esbuild/lib/main.js:1526:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}
Node.js v20.11.
barretenbergtop-level await makesNoirJSbreak in 0.23.0Gonna expand a bit, this is what I think is happening:
How to reproduce
git clone https://github.com/noir-lang/noir-starter.gitcd noir-startergit switch zpedro/0.23.0cd vite-hardhatyarncp .env.example .envnpx hardhat nodeIn a different terminal, in
noir-starter/vite-hardhat:yarn installNETWORK=localhost yarn devError log in terminal