question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

watch:build not working

See original GitHub issue

It seems:

nodemon -q -w assets/ --ext '.' --exec 'npm run build'

is causing something weird with npm and I get the default ‘wrong command’ help in the console:

Usage: npm <command>

where <command> is one of:
   ...
npm@1.4.28 /usr/local/lib/node_modules/npm

on other computers it doesn’t re-build at all. I tried already ‘watch’ from npm, but there the rebuild breaks somewhere and I have to kill processes manually.

Any ideas?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
keithamuscommented, Feb 2, 2015

It says the command run was npm watch build. That doesn’t look right - it should be npm run watch:build. What does your modified package.json look like?

0reactions
PatrickHeneisecommented, Feb 2, 2015
{
  "name": "npm-site-generator",
  "version": "1.0.0",
  "description": "static site generator with NPM",
  "main": "index.js",
  "author": "Keith Cirkel <npm@keithcirkel.co.uk> (http://keithcirkel.co.uk/)",
  "contributors": [
    {
      "name": "Patrick Heneise",
      "email": "patrick@blended.io",
      "url": "http://blended.io"
    }
  ],
  "license": "MIT",
  "devDependencies": {
    "async": "^0.9.0",
    "browserify": "^6.3.2",
    "hashmark": "^2.0.0",
    "http-server": "^0.7.3",
    "jshint": "^2.5.10",
    "karma": "^0.12.28",
    "karma-browserify": "^1.0.0",
    "karma-cli": "^0.0.4",
    "karma-mocha": "^0.1.10",
    "karma-phantomjs-launcher": "^0.1.4",
    "live-reload": "^0.2.0",
    "minifyify": "^4.4.0",
    "mocha": "^2.0.1",
    "nodemon": "^1.2.1",
    "opener": "^1.4.0",
    "parallelshell": "^1.0.0",
    "rimraf": "^2.2.8",
    "s3-cli": "^0.11.1",
    "hogan": "^1.0.2"
  },
  "scripts": {
    "clean": "rimraf dist/*",
    "prebuild": "npm run clean",
    "build": "npm run build:scripts && npm run build:styles && npm run build:markup && npm run copy:assets && npm run copy:fonts && npm run copy:images ",
    "build:scripts": "cp -R src/assets/js dist/",
    "build:styles": "sass src/assets/scss/styles.scss | hashmark -n stylescss -s -l 8 -m assets.json 'dist/{name}-{hash}.css'",
    "build:markup": "node hogan-render.js",
    "copy:assets": "cp -R src/assets/js/lib dist/",
    "copy:fonts": "cp -R src/assets/fonts dist/",
    "copy:images": "cp -R src/assets/imgs dist/",
    "test": "karma start --singleRun",
    "watch": "parallelshell 'npm run watch:test' 'npm run watch:build'",
    "watch:test": "karma start",
    "watch:build": "nodemon -q -w assets/ --ext '.' --exec 'npm show npm'",
    "open:prod": "opener http://example.com",
    "open:stage": "opener http://staging.example.internal",
    "open:dev": "opener http://localhost:9090",
    "deploy:prod": "s3-cli sync ./dist/ s3://example-com/prod-site/",
    "deploy:stage": "s3-cli sync ./dist/ s3://example-com/stage-site/",
    "serve": "http-server -p 9090 dist/",
    "live-reload": "live-reload --port 9091 dist/",
    "dev": "npm run open:dev -s & parallelshell 'npm run live-reload' 'npm run serve' 'npm run watch'"
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

fastlane/watchbuild: Get a notification once your ... - GitHub
WatchBuild lets you know as soon as it is done. WatchBuild is a simple standalone tool that shows a notification once your newly...
Read more >
Angular: Watch Build for Changes - JavaScript in Plain English
Why build and deploy on a separate web server. In a sample use case, imagine creating an installable progressive web app (PWA). The...
Read more >
iPhone is busy: Making Apple Watch ready for development
iphone tries to activate my apple watch 1 to no avail and they both download in half a day! How can I solve...
Read more >
Apple Watch: Build it & They Will Come… Or Will They? | LoadProof
That's the problem with the Apple Watch: the technological nature of it means that it will be outdated quickly. The high-end audience that...
Read more >
clojure - boot-clj watch build -> run jar - ok -> change code
Caused by: java.io.FileNotFoundException: Could not locate my_dir/foo__init.class or my_dir/foo.clj on classpath. Please check that namespaces ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found