TypeScript compiler failed with exit code 1 and stop the exceution

nativescriptcore

#1

I am getting this error while executing my native script application, using command “tns run android”.
I am new to native scripts. tried many things but coudn’t resolve this error.

tns version 3.4.0
npm version 3.10.10
node version 6.12.3
tsc version 2.4.2

Thanks in advance!


#2

I believe it is something related to your project / code. Did you try running any default templates, still fails?


#3

Yes. it fails with every native script project. getting the same error.
previously it was working fine


#4

Try this

install latest node LTS version -> https://nodejs.org/en/
verify, whether nodejs and npm versions
install typescript -> npm install typescript
clear npm cache with npm cache clear
install nativescript -> npm install nativescript --g
create new project tns create testNG --ng
run the project ->tns run android

If above solution does’t worked than try to reinstall Nativescript

npm uninstall nativescript --g
npm install nativescript --g
tns run android


#5

I resolved this issue. It was due to ENOSPACE.
Below mentioned solution helped:

–Run the following command to avoid ENOSPC:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.d/99-sysctl.conf && sudo sysctl -p

and then
sudo sysctl --system

Thanks !