Jigyasa
Jigyasa

Reputation: 13

TypeScript compiler failed with exit code 1 with

> Project successfully prepared (Android)
Building project...
Gradle build...
         + applying user-defined configuration from /home/scideas/testApp2/app/App_Resources/Android/app.gradle
         + adding nativescript runtime package dependency: nativescript-optimized
         + adding aar plugin dependency: /home/scideas/testApp2/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
false
Running full build
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Project successfully built.
Installing...
Successfully installed on device with identifier 'emulator-5554'.
Successfully transferred all files.
Refreshing application...
Successfully synced application org.nativescript.testApp2 on device emulator-5554.
Executing before-watch hook from /home/scideas/testApp2/hooks/before-watch/nativescript-dev-typescript.js
Found peer TypeScript 2.4.2
ActivityManager: Start proc 5309:org.nativescript.testApp2/u0a57 for activity org.nativescript.testApp2/com.tns.NativeScriptActivity
fs.js:1453
    throw error;
    ^

Error: watch /home/scideas/testApp2 ENOSPC
    at exports._errnoException (util.js:1020:11)
    at FSWatcher.start (fs.js:1451:19)
    at Object.fs.watch (fs.js:1478:11)
    at Object.watchDirectory (/home/scideas/testApp2/node_modules/typescript/lib/tsc.js:2394:32)
    at Object.executeCommandLine (/home/scideas/testApp2/node_modules/typescript/lib/tsc.js:58090:43)
    at Object.<anonymous> (/home/scideas/testApp2/node_modules/typescript/lib/tsc.js:58450:4)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

TypeScript compiler failed with exit code 1

I am getting above error when trying to run the android emulator within my native script project folder.

I tried by upgrading the versions of tsc, tns, node and npm, and also removed platforms and node modules from the project and re-run the tns run android command. but couldn't resolve this error. I am new to native script. any help is appreciated. Thanks! My package.json and tsconfig.json file is below

package.json

`{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.NgProject",
    "tns-android": {
      "version": "3.4.0"
    }
  },
  "dependencies": {
    "@angular/animations": "~5.0.0",
    "@angular/common": "~5.0.0",
    "@angular/compiler": "~5.0.0",
    "@angular/core": "~5.0.0",
    "@angular/forms": "~5.0.0",
    "@angular/http": "~5.0.0",
    "@angular/platform-browser": "~5.0.0",
    "@angular/platform-browser-dynamic": "~5.0.0",
    "@angular/router": "~5.0.0",
    "allow-publish": "^1.0.4",
    "jssha": "^2.3.1",
    "nativescript-angular": "^5.0.0",
    "nativescript-sqlite": "^2.0.1",
    "nativescript-theme-core": "~1.0.4",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.5.2",
    "tns-core-modules": "~3.4.0",
    "zone.js": "~0.8.2"
  },
  "devDependencies": {
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "~0.6.0",
    "typescript": "~2.4.2"
  }
} `

tsconfig.json

`{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "noEmitHelpers": true,
        "noEmitOnError": true,
        "lib": [
            "es6",
            "dom",
            "es2015.iterable"
        ],
        "baseUrl": ".",
        "paths": {
            "*": [
                "./node_modules/tns-core-modules/*",
                "./node_modules/*"
            ]
        }
    },
    "exclude": [
        "node_modules",
        "platforms"
    ]
}`

I am getting the same error with every native script project right now previously it was running fine.

Upvotes: 1

Views: 2197

Answers (1)

Jeff Huijsmans
Jeff Huijsmans

Reputation: 1418

ENOSPC means there's no space left on the harddisk / ssd. Please verify that. It could also be a specific partition (maybe /tmp?).

This might also be valuable to you: Node.JS Error: ENOSPC

And: https://github.com/gulpjs/gulp/issues/217

Upvotes: 3

Related Questions