2

I have this in package.json:

"scripts": {
  "build": "browserify app/components/main.js -o build/js/app.js -d"
}

When I run this command from shell, it executes and creates the file just fine. But when I run npm build, nothing happens. What am I doing wrong and how to fix it?

Sergei Basharov
  • 51,276
  • 73
  • 200
  • 335

1 Answers1

2

I think you're running into a problem because npm build is a command in npm itself. https://docs.npmjs.com/cli/build

Try doing npm run-script build or npm run build to explicitly run the script named build.

See also: `npm build` doesn't run my build scripts

Tennyson H
  • 1,705
  • 15
  • 28