Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fsevents not available for non-Mac platforms (bundling issue) #448

Closed
acodercat opened this issue Jun 14, 2017 · 57 comments

Comments

@acodercat
Copy link

commented Jun 14, 2017

λ truffle serve
Serving static assets in .\build on port 8080...
C:\Users\Cat\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:119780
return (new fsevents(path)).on('fsevent', callback).start();
^

TypeError: fsevents is not a constructor
at createFSEventsInstance (C:\Users\Cat\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:119780:11)
at setFSEventsListener (C:\Users\Cat\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:119834:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (C:\Users\Cat\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:119998:16)
at FSWatcher. (C:\Users\Cat\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:120132:25)
at gotStat (fs.js:1737:21)
at FSReqWrap.oncomplete (fs.js:114:15)

@brakmic

This comment has been minimized.

Copy link

commented Jun 18, 2017

Had the same problem with truffle@beta. After having installed truffle@3.2.1 the problem disappeared. However, for a successful install of truffle@3.2.1 you must have a VS2015 build chain. I know it doesn't sound like a real solution but according to this thread it's rather hard to run truffle properly under Windows.

@Enigmatic331

This comment has been minimized.

Copy link

commented Jun 28, 2017

On a Windows machine. Can confirm that I am also having the problem with the latest truffle (release v3.3.0) when running truffle serve. Installed truffle@3.2.1 which resolves this issue (thanks brakmic).

I'm a bit tempted to buy a MacBook just to develop on Truffle....

@seunlanlege

This comment has been minimized.

Copy link

commented Jun 29, 2017

Just had this Same issue resolved with installing truffle@3.2.1

it's not a windows10 issue, as i was running ubuntu 16.04

@tcoulter

@haraldini

This comment has been minimized.

Copy link

commented Jun 29, 2017

Same issue on MacOS

@EdgarCloggs

This comment has been minimized.

Copy link

commented Jun 29, 2017

Same issue on Ubuntu 16.04 - truffle@3.30, workaround I found to use:

npm run dev

@tcoulter

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2017

Confirmed issue with Truffle 3.3.0. We're on it.

@tcoulter tcoulter changed the title win10 fsevents not available for non-Mac platforms (bundling issue) Jun 29, 2017

@liskicious

This comment has been minimized.

Copy link

commented Jul 3, 2017

@EdgarCloggs

I don't understand the npm run dev workaround?

After running:
truffle init
truffle compile
truffle migrate

there is no package.json there. So no script to run?
Would you know where I can get the package.json for the truffled project?

@kevupton

This comment has been minimized.

Copy link

commented Jul 13, 2017

can confirm happening windows 10 v3.4.4

@d10r

This comment has been minimized.

Copy link

commented Jul 14, 2017

Is there any known workaround for the time being? Ubuntu 14.04 here.

Edit: The workaround npm run dev works with such a setup: https://github.com/trufflesuite/truffle-init-webpack

@yozef

This comment has been minimized.

Copy link

commented Jul 14, 2017

npm run dev works with truffle 3.3.1 on Mac

@yellowred

This comment has been minimized.

Copy link

commented Jul 18, 2017

same here at macOS 10.12.5

$ truffle version
Truffle v3.4.5 (core: 3.4.5)

npm run dev works though.

@vmatekole

This comment has been minimized.

Copy link

commented Jul 18, 2017

same here

macOS 10.12.5
Truffle v3.4.5 (core: 3.4.5)
@fredolamolette

This comment has been minimized.

Copy link

commented Jul 19, 2017

Same with Truffle v3.2.8 on Mac OS 10.12.5 Sierra

@fredolamolette

This comment has been minimized.

Copy link

commented Jul 19, 2017

Any fix to come ?

@ron137

This comment has been minimized.

Copy link

commented Jul 24, 2017

Same with truffle 3.4.5 on Mac 10.12.5 Sierra
Node Version: 7.6
npm version: 4.1.2

return (new fsevents(path)).on('fsevent', callback).start();
^

TypeError: fsevents is not a constructor
at createFSEventsInstance (/Users/ron/.nvm/versions/node/v7.6.0/lib/node_modules/truffle/build/cli.bundled.js:124978:11)
at setFSEventsListener (/Users/ron/.nvm/versions/node/v7.6.0/lib/node_modules/truffle/build/cli.bundled.js:125032:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/ron/.nvm/versions/node/v7.6.0/lib/node_modules/truffle/build/cli.bundled.js:125196:16)
at FSWatcher. (/Users/ron/.nvm/versions/node/v7.6.0/lib/node_modules/truffle/build/cli.bundled.js:125330:25)
at gotStat (fs.js:1723:21)
at FSReqWrap.oncomplete (fs.js:114:15)

@dflick

This comment has been minimized.

Copy link

commented Aug 4, 2017

Hey guys,
Same with truffle 3.4.6 on Ubuntu 16.04.
Any fix in the near future?

Or, how can I downgrade my truffle version to a working one?

Edit: Ok, I used npm install -g truffle@3.2.1 and this seems to work fine.

@avitus

This comment has been minimized.

Copy link

commented Aug 10, 2017

Same problem on MacOS with truffle 3.4.8

@lastcoolnameleft

This comment has been minimized.

Copy link

commented Aug 11, 2017

I had a similar issue and this is what fixed it for me was to re-initialize a new truffle instance with "truffle init webpack" :

➜  truffle> truffle serve
Serving static assets in ./build on port 8080...
/Users/thfalgou/.nvm/versions/node/v6.6.0/lib/node_modules/truffle/build/cli.bundled.js:115605
  return (new fsevents(path)).on('fsevent', callback).start();
          ^
➜  truffle> cd ..
➜  ethereum> mkdir truffle-webpack
➜  ethereum> cd truffle-webpack
➜  truffle-webpack> truffle init webpack
Using `truffle init` with a specific template is deprecated. Please use `truffle unbox` instead.
...
➜  truffle-webpack> truffle compile
Compiling ./contracts/ConvertLib.sol...
...
➜  truffle-webpack> truffle migrate
Using network 'development'.
...
➜  truffle-webpack> npm run dev

> truffle-init-webpack@0.0.2 dev /Users/thfalgou/tmp/ethereum/truffle-webpack
> webpack-dev-server

Project is running at http://localhost:8080/
@xunfeng1980

This comment has been minimized.

Copy link

commented Aug 13, 2017

I also had similar issue.old version is fine."npm run dev" only can run Boxes DApp,like these.http://truffleframework.com/boxes/

@ljinkai

This comment has been minimized.

Copy link

commented Aug 15, 2017

I also had the same issue. MacOs
Truffle v3.4.8
node.js v6.11.2

@cocos543

This comment has been minimized.

Copy link

commented Aug 22, 2017

I also had the same issue. MacOs
Truffle v3.4.7 (core: 3.4.7)
Solidity v0.4.13 (solc-js)

@haozheng01

This comment has been minimized.

Copy link

commented Aug 22, 2017

I also had the same issue. Truffle v3.4.9

@vsergeev

This comment has been minimized.

Copy link

commented Aug 22, 2017

Same issue with Truffle v3.4.9 on Arch Linux:

$ truffle version
Truffle v3.4.9 (core: 3.4.8)
Solidity v0.4.15 (solc-js)
$ truffle init
...
$ truffle compile
...
$ truffle migrate
...
$ truffle serve
Serving static assets in ./build on port 8080...
/usr/lib/node_modules/truffle/build/cli.bundled.js:115605
  return (new fsevents(path)).on('fsevent', callback).start();
          ^

TypeError: fsevents is not a constructor
    at createFSEventsInstance (/usr/lib/node_modules/truffle/build/cli.bundled.js:115605:11)
    at setFSEventsListener (/usr/lib/node_modules/truffle/build/cli.bundled.js:115659:16)
    at FSWatcher.FsEventsHandler._watchWithFsEvents (/usr/lib/node_modules/truffle/build/cli.bundled.js:115823:16)
    at FSWatcher.<anonymous> (/usr/lib/node_modules/truffle/build/cli.bundled.js:115957:25)
    at gotStat (fs.js:1783:21)
    at FSReqWrap.oncomplete (fs.js:152:21)
$
@lukehamilton

This comment has been minimized.

Copy link

commented Aug 24, 2017

When will this be fixed? I keep having to install different versions of Truffle to get different functionality :(

@animeshjn

This comment has been minimized.

Copy link

commented Aug 29, 2017

Same issue on Windows Platform

@ZihaoZhang270

This comment has been minimized.

Copy link

commented Aug 31, 2017

Use “truffle init webpack”
and "npm run dev" instead of "truffle serve"

@ghost ghost referenced this issue Aug 31, 2017
@hackingbeauty

This comment has been minimized.

Copy link

commented Sep 17, 2017

Hello, is there any update on this issue? We're having problems.

@pranoygn

This comment has been minimized.

Copy link

commented Oct 17, 2017

Facing the same problem in Ubuntu 16.04

`truffle serve
Serving static assets in ./build on port 8080...
/usr/local/lib/node_modules/truffle/build/cli.bundled.js:114396
return (new fsevents(path)).on('fsevent', callback).start();
^

TypeError: fsevents is not a constructor
`

@stvenyin

This comment has been minimized.

Copy link

commented Oct 23, 2017

npm uninstall -g truffle
npm install -g truffle@3.2.1
i'hava sloulation this probloem
nice

@stvenyin

This comment has been minimized.

Copy link

commented Oct 23, 2017

try npm install -g truffle@3.2.1 --unsafe-perm

@sgehrman

This comment has been minimized.

Copy link

commented Nov 9, 2017

same problem. Truffle 4.0.1 on Ubuntu

@mengjiaqi

This comment has been minimized.

Copy link

commented Nov 23, 2017

same problem. Truffle 4.0.1 on MAC.
and i've fixed it.
clone the project locally with

git clone https://github.com/trufflesuite/truffle && cd truffle
echo 'module.exports = null ' > null.js

and then edit the file cli.webpack.config.js on line 85

"fsevents": path.join(__dirname, "./null.js"),

run

npm run build
npm uninstall -g truffle
npm install -g truffle `pwd`

that's it!

@reedhong

This comment has been minimized.

Copy link

commented Nov 23, 2017

@mengjiaqi NB!

@pospi

This comment has been minimized.

Copy link

commented Nov 24, 2017

@mengjiaqi does that actually fix watch mode now, or just avoid the crash? I guess I'd have to test on Ubuntu to be sure. I had a PR earlier where I fixed the crash via the same sort of faux-fsevents object, but watch still didn't actually work.

@dcb9

This comment has been minimized.

Copy link

commented Nov 28, 2017

$ truffle --version
Truffle v4.0.1 - a development framework for Ethereum

$ truffle serve
Serving static assets in ./build on port 8080...
/usr/local/lib/node_modules/truffle/build/cli.bundled.js:219284
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:219284:11)
at setFSEventsListener (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:219338:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:219502:16)
at FSWatcher. (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:219636:25)
at gotStat (fs.js:1783:21)
at FSReqWrap.oncomplete (fs.js:152:21)

OS: MacOS 10.13.1 (17B48)

@mengjiaqi

This comment has been minimized.

Copy link

commented Nov 28, 2017

@pospi It just avoid the crash.

@maxweng

This comment has been minimized.

Copy link

commented Dec 6, 2017

@mengjiaqi works like a charm. Thanks!

@JackPickering

This comment has been minimized.

Copy link

commented Dec 31, 2017

@mengjiaqi When I go to do 'npm run build' I get the error 'webpack not found', I have installed Truffle 4.0.4 and I have also already unboxed a webpack on the server but still get this error.

Any ideas?

Is there any documentation on how to actually deploy these Dapps onto a remote server using truffle 4?

pkonyves added a commit to pkonyves/trufflesuite.com that referenced this issue Jan 10, 2018
Updated outdated information
* change `truffle init webpack` to `truffle unbox webpack` and it's git repo url as `init webpack` is obsolete
* the default network port is changed from 8545 to 7545. this is used by galanche and the webpack box
* added not on which file the `import metacoin_artifacts ...` code is placed
* change `truffle serve` to `npm run dev`, truffle serve runs into problems because of: trufflesuite/truffle#448
@sing1ee

This comment has been minimized.

Copy link

commented Jan 15, 2018

@mengjiaqi meng cool

@oneclouds

This comment has been minimized.

Copy link

commented Jan 15, 2018

I also have the same problem on Ubuntu 16.04 when I try to executive the command of "truffle serve"
TypeError: fsevents is not a constructor

@ShaleenThapa

This comment has been minimized.

Copy link

commented Jan 24, 2018

Have the same issue:

PS C:\ToDel> truffle serve
Serving static assets in .\build on port 8080...
C:\Users\testu\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:220548
return (new fsevents(path)).on('fsevent', callback).start();
^

TypeError: fsevents is not a constructor
at createFSEventsInstance (C:\Users\testu\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:220548:11)

at FSReqWrap.oncomplete (fs.js:152:21)
PS C:\ToDel> truffle version
Truffle v4.0.5 (core: 4.0.5)
Solidity v0.4.18 (solc-js)
PS C:\ToDel>

@sanshao

This comment has been minimized.

Copy link

commented Feb 3, 2018

Have the same issue:

Truffle v4.0.6 (core: 4.0.6)
Solidity v0.4.19 (solc-js)

mac os 10.12.6

@lijiangongo

This comment has been minimized.

Copy link

commented Feb 9, 2018

npm uninstall -g truffle
npm install -g truffle@3.4.5
mkdir truffle-webpack
cd truffle-webpack
truffle init webpack
truffle compile
npm run dev

don't run "truffle serve" , run "npm run dev" instead of

i'hava sloulation this probloem on Mac os 10.12.6

@jackz-jones

This comment has been minimized.

Copy link

commented Feb 12, 2018

Have the same problem :

Truffle v4.0.6 (core: 4.0.6)
Solidity v0.4.19 (solc-js)

mac os 10.13.3

@GodwinAdam

This comment has been minimized.

Copy link

commented Feb 26, 2018

Have the same problem :

Truffle v4.0.6 (core: 4.0.6)
Solidity v0.4.19 (solc-js)

mac os 10.12.3

please provide some solution

@dingymm

This comment has been minimized.

Copy link

commented Feb 27, 2018

npm uninstall -g truffle
npm install -g truffle@3.4.5
mkdir truffle-webpack
cd truffle-webpack
truffle init webpack
truffle compile
npm run dev

ubuntu is worked~

@xuyao91

This comment has been minimized.

Copy link

commented Apr 10, 2018

Truffle v4.1.5 (core: 4.1.5)
Solidity v0.4.21 (solc-js)
Have the same problem.

@craigbranscom

This comment has been minimized.

Copy link

commented Apr 12, 2018

Same issue here on macOS High Sierra

Truffle v4.1.3 (core: 4.1.3)
Solidity v0.4.19 (solc-js)

@JimiPedros

This comment has been minimized.

Copy link

commented May 4, 2018

npm ERR! missing script: dev

@XiaoZhangJian

This comment has been minimized.

Copy link

commented May 30, 2018

Have the same problem:

➜ truffleTest truffle version
Truffle v4.1.8 (core: 4.1.9)
Solidity v0.4.24 (solc-js)

➜ truffleTest truffle serve
Serving static assets in ./build on port 8080...

/usr/local/lib/node_modules/truffle/build/webpack://chokidar/lib/fsevents-handler.js:26
return (new fsevents(path)).on('fsevent', callback).start();
^
TypeError: fsevents is not a constructor
at createFSEventsInstance (/usr/local/lib/node_modules/truffle/build/webpack:/
/chokidar/lib/fsevents-handler.js:26:1)
at setFSEventsListener (/usr/local/lib/node_modules/truffle/build/webpack://chokidar/lib/fsevents-handler.js:80:1)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/usr/local/lib/node_modules/truffle/build/webpack:/
/chokidar/lib/fsevents-handler.js:244:1)
at FSWatcher. (/usr/local/lib/node_modules/truffle/build/webpack:/~/chokidar/lib/fsevents-handler.js:378:1)
at gotStat (fs.js:1824:21)
at FSReqWrap.oncomplete (fs.js:170:21)

@stale

This comment has been minimized.

Copy link

commented Nov 8, 2018

Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem.

@stale stale bot added the stale label Nov 8, 2018

@stale

This comment has been minimized.

Copy link

commented Nov 15, 2018

There has been no new activity on this issue since it was marked as stale 7 days ago, so it is being automatically closed. If you'd like help with this or a different problem, please open a new issue. Thanks!

@stale stale bot closed this Nov 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.