Build from source instructions
Closed this issue · 4 comments
pdufour commented
System Info
Building from source
Description
I am trying to build transformers.js from github directly, but running into errors. I can't find any README instructions either. I thought maybe I just could run yarn dev
but that is giving me errors.
Is there another command I should be running perhaps?
Reproduction
- Clone transformers.js repository
- Run
yarn dev
- See error
[webpack-cli] Error: Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config.
at Command.<anonymous> (/Users/paul.dufour/transformers.js/node_modules/@webpack-cli/serve/lib/index.js:152:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command.parseAsync (/Users/paul.dufour/transformers.js/node_modules/commander/lib/command.js:935:5)
at async Command.<anonymous> (/Users/paul.dufour/transformers.js/node_modules/webpack-cli/lib/webpack-cli.js:1356:13)
at async Command.parseAsync (/Users/paul.dufour/transformers.js/node_modules/commander/lib/command.js:935:5)
at async WebpackCLI.run (/Users/paul.dufour/transformers.js/node_modules/webpack-cli/lib/webpack-cli.js:1360:9)
at async runCLI (/Users/paul.dufour/transformers.js/node_modules/webpack-cli/lib/bootstrap.js:9:9)
Expected Results:
Should run the dev server.
xenova commented
Hi there 👋 You should be able to do something similar to:
npm install huggingface/transformers.js
pdufour commented
Hi @xenova I was more thinking if I wanted to make changes to transformers.js and then test them locally.
xenova commented
In that case, you should be able to:
You should be able to import using a relative path to ./src/transformers.js
. This is how I do it :)
Otherwise, you can do this:
- Run
npm run build
in transformers.js root folder - Run
npm link
in transformers.js root folder - Run
npm link @huggingface/transformers
in your testing folder
pdufour commented
Thanks that works