Serving static assets in ./build on port 8080...
  return (new fsevents(path)).on('fsevent', callback).start();

TypeError: fsevents is not a constructor
    at createFSEventsInstance (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:144626:11)
    at setFSEventsListener (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:144680:16)
    at FSWatcher.FsEventsHandler._watchWithFsEvents (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:144844:16)
    at FSWatcher.<anonymous> (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:144978:25)
    at LOOP (fs.js:1753:14)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

npm run dev is also not working for me.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/bin/npm', 'run', 'dev' ]
2 info using npm@5.3.0
3 info using node@v8.2.1
4 verbose stack Error: missing script: dev
4 verbose stack     at run (/usr/lib/node_modules/npm/lib/run-script.js:151:19)
4 verbose stack     at /usr/lib/node_modules/npm/lib/run-script.js:61:5
4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:114:5
4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:401:5
4 verbose stack     at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:45)
4 verbose stack     at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:399:3)
4 verbose stack     at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:159:5)
4 verbose stack     at ReadFileContext.<anonymous> (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:331:20)
4 verbose stack     at ReadFileContext.callback (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16)
4 verbose stack     at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)
5 verbose cwd /home/ankit-x3/TRUFFLE
6 verbose Linux 4.4.0-87-generic
7 verbose argv "/usr/local/bin/node" "/usr/bin/npm" "run" "dev"
8 verbose node v8.2.1
9 verbose npm  v5.3.0
10 error missing script: dev
11 verbose exit [ 1, true ]

please help! I have understood the error. I require some script in the dev tag in the package.json file. Now can someone tell me what that needs to be?


npm uninstall -g truffle

npm install -g truffle@3.2.1

  • Hi, thanks for answering this question. Can you please add some comments to your answer? – Roman Frolov Jan 14 '18 at 12:53
  • Because truffle version – user3339784 Jan 14 '18 at 13:02

I was using Truffle v3.3.0 when I had the same issue with fsevent bundling; Resolved it by using Truffle v3.2.1:

npm install -g truffle@3.2.1

Seems to still be an issue for some: https://github.com/trufflesuite/truffle/issues/448

Let us know if this doesn't help? (rep<50 else I would have left a comment which should be more appropriate)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.