-
-
Notifications
You must be signed in to change notification settings - Fork 197
tns livesync ios error on before-watch hook #1676
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
Comments
Hi @leocaseiro , |
Thank you so much. I've tested now and worked just fine. PS: I had to update the brew and install my xcode with: |
Hi @rosen-vladimirov, I'm actually having the same issue still.
I was trying to debug and I've realised that if I comment the beforewatch/nativescript-dev-typescript.js However, as you can realise, the watch won't work with any JS changes... I'm not sure how to fix that. Could you please help me out? node_modules/nativescript-dev-typescript/lib/watch.js var compiler = require('./compiler');
module.exports = function ($logger, $projectData, $errors) {
return compiler.runTypeScriptCompiler($logger, $projectData.projectDir, { watch: true });
} |
I temporary sorted it out using gulp to watch my .ts files and then, livesync(which works while watching .js files). In that case, my gulp task watches .ts and update all .js while livesync handles all .js files and update and sync my ios emulator... |
If someone is interested in this solution, just make sure you run livesync before gulp. npm dependencies:
./gulpfile.js 'use strict';
var args = require('yargs').argv,
gulp = require('gulp'),
$ = require('gulp-load-plugins')({lazy: true});
var options = {
isDebug: args.debug || false,
isProduction: args.production || false,
sourceFolder: ['./*.d.ts', './app/**/*.ts'],
destinationFolder: './app'
};
gulp.task('typescript', function() {
var tsconfigJson = require('./tsconfig.json');
return gulp.src(options.sourceFolder)
.pipe($.plumber())
.pipe($.if(options.isDebug, $.debug({title: 'typescript'})))
.pipe($.if(!options.isProduction, $.sourcemaps.init()))
.pipe($.typescript(tsconfigJson.compilerOptions))
.pipe($.sourcemaps.write('.'))
.pipe(gulp.dest(options.destinationFolder));
});
gulp.task('default', ['typescript'], function() {
gulp.watch(options.sourceFolder, ['typescript']);
}); Run with yarg debug:
|
Hi, I'd like to reopen this issue and let people know that this problem works on a case-sensitive partition. I formatted my MAC and I have 2 partitions now, 1 case-sensitive and another one which is not. The case-sensitive get's the same error, where the case-insensitive runs I believe in somewhere in the code or something with NodeJS perhaps. We have some case-sensitive issue. I'll investigate and I'll up to date. |
I've just noticed that the error shows However, my folder structure is: I'm trying to debug the Any help is very welcome, btw |
The bug is with TypeScript, not NativeScript. TypeScript has made some changes with case-sensitive and the solution @cmoffatt found it to Downgrade to [email protected], you can read more here: |
Hi I'm following the Building Apps with NativeScript and Angular 2 to build the groceries app. It works fine when I run
tns run ios --emulator
ortns livesync ios --emulator
, but if I want to watch my files, doesn't work at al..Is that any way to reload without watch?
I'm trying to run the follow command:
tns livesync ios --emulator --watch
Here's the error that happens on
before-watch hook
which is basically a require to the filenativescript-dev-typescript/lib/watch.js
I've runned a trace and the log is on pastebin.
I post here the main errors:
Errors
tns version: 1.7.1
OSX El Capitan: 10.11.3
npm 3.8.6
Node 5.4.0
npm packages:
gcc --version
Thanks in advance!
The text was updated successfully, but these errors were encountered: