0

I am trying web application bundler parcel and doing as per Github description. My html and javascript files are below.

my parcel index.html gives below error,

Error: watch /node_modules/babel-plugin-transform-react-jsx-source ENOSPC
at exports._errnoException (util.js:1020:11)
at FSWatcher.start (fs.js:1451:19)
at Object.fs.watch (fs.js:1478:11)
at createFsWatchInstance (/usr/lib/node_modules/parcel-bundler/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/usr/lib/node_modules/parcel-bundler/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/usr/lib/node_modules/parcel-bundler/node_modules/chokidar/lib/nodefs-handler.js:232:14)
at FSWatcher.NodeFsHandler._handleDir (/usr/lib/node_modules/parcel-bundler/node_modules/chokidar/lib/nodefs-handler.js:414:19)
at FSWatcher.<anonymous> (/usr/lib/node_modules/parcel-bundler/node_modules/chokidar/lib/nodefs-handler.js:462:19)
at FSWatcher.<anonymous> (/usr/lib/node_modules/parcel-bundler/node_modules/chokidar/lib/nodefs-handler.js:467:16)
at FSReqWrap.oncomplete (fs.js:123:15)

events.js:160 throw er; // Unhandled 'error' event ^

index.html

<!DOCTYPE HTML>
   <head>
    <title>Add two numbers</title>
    <script type="text/javascript" src="index.js">
    </script>
    </script>
</head>
<body>
    Enter the first number: <input type="text" id="txt1" /><br /> Enter the seccond number: <input type="text" id="txt2" /><br />
    <input type="button" onclick="call()" value="Add" />
</body>
</html>

And Below is index.js file:

   function call() {
    var q = parseInt(document.getElementById("txt1").value);
    var w = parseInt(document.getElementById("txt2").value);
    var result = q + w;
    if (isNaN(q) || isNaN(w)) {
        alert("please enter a number");
    } else

    {

        var result = q + w;
        alert("The sum is " + result);
    }

}
Kuldeep
  • 83
  • 1
  • 9

1 Answers1

0

I do think this issue was at least partly resolved with the fixes discussed here:

https://github.com/parcel-bundler/parcel/issues/1308

Amaru
  • 11
  • 1
  • 2
  • A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](https://meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. [Answers that are little more than a link may be deleted](https://stackoverflow.com/help/deleted-answers). – brass monkey Oct 12 '18 at 17:56