Code Monkey home page Code Monkey logo

Comments (3)

junderw avatar junderw commented on June 12, 2024

You have to build the main package first, then cd into the example, npm ci, then npm start.

From the root:

(note: you must have rust (cargo, rustc, rustup) installed and the wasm32-unknown-unknown target installed, as well as wasm-opt (part of the binaryen package)

$ make build
$ cd examples/react-app/
$ npm ci
$ npm start

from tiny-secp256k1.

Janaka-Steph avatar Janaka-Steph commented on June 12, 2024

make build fails printing

rm -rf \
                .nyc_output \
                coverage \
                examples/react-app/dist/*.js \
                examples/react-app/dist/*.txt \
                examples/react-app/dist/*.wasm \
                lib \
                tests/browser
npx tsc && \
        sed -i -e 's/\.\/wasm_path\.js/.\/wasm_path_cjs.js/g' ./src_ts/wasm_loader.ts && \
        npx tsc -p tsconfig-cjs.json && \
        sed -i -e 's/\.\/wasm_path_cjs\.js/.\/wasm_path.js/g' ./src_ts/wasm_loader.ts && \
        for f in ./lib/cjs/*.js; do mv -- "$f" "${f%.js}.cjs"; done && \
        for f in ./lib/cjs/*.cjs; do sed -i -e 's/\(require(".*\)\.js");/\1.cjs");/g' -- "$f"; done
sed: --: No such file or directory
sed: --: No such file or directory
sed: --: No such file or directory
sed: --: No such file or directory
sed: --: No such file or directory
sed: --: No such file or directory
sed: --: No such file or directory
sed: --: No such file or directory
make: *** [build-js] Error 1
▶ rustup show      
Default host: aarch64-apple-darwin
rustup home:  /Users/stephane/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
1.57.0-aarch64-apple-darwin

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.60.0 (7737e0b5c 2022-04-04)

from tiny-secp256k1.

junderw avatar junderw commented on June 12, 2024

perhaps it's an issue with sed vs. gsed.

I don't have a Mac to test.

from tiny-secp256k1.

Related Issues (20)

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.