While I am aware that angular2 is still in beta, I decided to give it a try. I followed the angular2 quickstart guide available at https://angular.io/docs/js/latest/quickstart.html and everything seemed to be working fine. Now, I wanted to integrate Parse into my project, so I looked into using tsd to access Parse from TypeScript.
Following the instructions, I initialized tsd and installed Parse using the command:
tsd init
tsd install parse --save
This added the Parse definition file (parse.d.ts) along with its dependencies (node.d.ts, jquery.d.ts, and underscore.d.ts), although the node.d.ts part caused some complications as it was already included with angular2. In an attempt to resolve this, I removed the duplicate definitions as follows:
Remove "typings/node" folder (node/node.d.ts)
Remove '/// <reference path="node/noded.ts" />' from typings/tsd.d.ts
Remove '/// <reference path="node/noded.ts" />' from typings/parse/parse.d.ts
Despite this solution, the project was still not working as expected. I encountered the error message:
node_modules/angular2/typings/angular-protractor/angular-protractor.d.ts(1679,13): error TS2403: Subsequent variable declarations must have the same type. Variable '$' must be of type 'JQueryStatic', but here has type 'cssSelectorHelper'.
However, this error did not seem to be the root cause of the issue.
The actual problem causing the crash when running npm start
was:
[1] events.js:141
[1] throw er; // Unhandled 'error' event
[1] ^
[1]
[1] Error: watch node_modules/angular2/es6/dev/examples/core/ts/bootstrap/bootstrap.js ENOSPC
[1] at exports._errnoException (util.js:855:11)
...
[1] at FSReqWrap.oncomplete (fs.js:82:15)
The detailed output can be viewed here: http://pastebin.com/xE3u3qUh
UPDATE
After realizing that the error was related to the angular2 examples, I removed them from the project which resolved the initial error. However, when I tried to install Parse using "npm install parse", I encountered a similar error but in a different location this time:
Error: watch node_modules/opt-merger/node_modules/lodash/lang/isFunction.js ENOSPC