Ionic-framework: tslint and ngc missing for new Ionic v2 RC0 project

Created on 2 Oct 2016  路  7Comments  路  Source: ionic-team/ionic-framework

Following instructions from the RC0 release notes I created a new project to migrate my beta-11 project to RC0. I checked that I the new CLI was installed and after all the steps and running ionic build android I got an error saying it could not find tslint nor ngc:

[16:36:28]  ionic-app-scripts 0.0.27
[16:36:28]  build prod started ...
[16:36:28]  clean started ...
[16:36:28]  clean finished in 6 ms
[16:36:28]  copy started ...
[16:36:28]  ngc started ...
[16:36:29]  lint started ...
[16:36:29]  Unable to find "tslint" command: null

[16:36:29]  copy finished in 35 ms
[16:36:29]  Unable to find Angular Compiler "ngc" command: null

It still didn't work even after installing them globally, only when running npm install tslint && npm install ngc it started working. Still I am running into an error that I haven't figured out yet:

tslint: /Users/abhaya/projects/myApp/node_modules/tslint/lib/configuration.js:184
            throw new Error("Could not find custom rule directory: " + directory);
            ^

Error: Could not find custom rule directory: /Users/abhaya/projects/myApp/node_modules/tslint-eslint-rules/dist/rules
    at getRulesDirectories (/Users/abhaya/projects/myApp/node_modules/tslint/lib/configuration.js:184:19)
    at loadConfigurationFromPath (/Users/abhaya/projects/myApp/node_modules/tslint/lib/configuration.js:101:37)
    at Object.findConfiguration (/Users/abhaya/projects/myApp/node_modules/tslint/lib/configuration.js:47:12)
    at processFile (/Users/abhaya/projects/myApp/node_modules/tslint/lib/tslint-cli.js:131:41)
    at /Users/abhaya/projects/myApp/node_modules/tslint/lib/tslint-cli.js:177:74
    at Array.forEach (native)
    at Object.<anonymous> (/Users/abhaya/projects/myApp/node_modules/tslint/lib/tslint-cli.js:177:41)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
$ ionic info

Your system information:

Cordova CLI: 6.3.0
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.8.2
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v4.4.7
Xcode version: Xcode 7.3.1 Build version 7D1014

Most helpful comment

It all started working when I re-created the project after upgrading node to v6 (and as a result upgrading npm to v3). I think it would be worth noting this requirement in the release notes.

Thanks!

All 7 comments

It all started working when I re-created the project after upgrading node to v6 (and as a result upgrading npm to v3). I think it would be worth noting this requirement in the release notes.

Thanks!

I have the same issue, brand new install, new project, but the same error. Just updated npm to 3.10.8 too

I stand corrected, I too needed Node v6 for it to work. Agree, it should be mentioned in the release notes

I have [email protected] and node v6.6.0 and still getting the tslint error

screen shot 2016-10-16 at 1 13 30 pm

I am getting the same error when trying to build

I am getting the same error when trying to build

Was this page helpful?
0 / 5 - 0 ratings