"scripts": { "watch:chrome": "webpack --config webpack/webpack.chrome.dev.js --watch", "build:chrome": "webpack --config webpack/webpack.chrome.prod.js", "watch:firefox": "webpack --config webpack/webpack.firefox.dev.js --watch", "build:firefox": "webpack --config webpack/webpack.firefox.prod.js", "watch:figma": "webpack --config webpack/webpack.figma.dev.js --watch", "build:figma": "webpack --config webpack/webpack.figma.prod.js" },
The above has no "build" script. So when you run npm run build
from the README you get an error npm ERR! Missing script: "build". And when you run docker build -t segment-anything .
you get the same error because the Dockerfile runs npm run build
The obvious quick fix is to rename your browser of choice to build:
"scripts": { "watch": "webpack --config webpack/webpack.chrome.dev.js --watch", "build": "webpack --config webpack/webpack.chrome.prod.js", "watch:firefox": "webpack --config webpack/webpack.firefox.dev.js --watch", "build:firefox": "webpack --config webpack/webpack.firefox.prod.js", "watch:figma": "webpack --config webpack/webpack.figma.dev.js --watch", "build:figma": "webpack --config webpack/webpack.figma.prod.js" },
But I'm wondering if there's a more elegant solution? Like mapping build to build:chrome for instance on initial setup.
Sorry if anything I said is imprecise or there's an obvious solution, I'm new to a lot of these tools