Tslint Error: "Could not find custom rule directory: " + directory


#1

I’m trying to get my app to serve

I’ve uninstalled ionic, run npm cache clear, and reinstalled ionic because I had an earlier version that was trying to find a gulpfile.

Running 'serve:before' npm script before serve
> myapp@ watch /Users/Path/to/myApp
> ionic-app-scripts watch
[14:05:25]  ionic-app-scripts 0.0.30
[14:05:25]  watch started ...
[14:05:25]  build dev started ...
[14:05:25]  clean started ...
[14:05:25]  clean finished in 8 ms
[14:05:25]  copy started ...
[14:05:25]  bundle dev started ...
[14:05:26]  lint started ...
[14:05:26]  copy finished in 325 ms
[14:05:26]  tslint: /Users/Path/to/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/Path/to/myApp/node_modules/tslint-ionic-rules/node_modules/tslint-eslint-rules/dist/rules
    at getRulesDirectories (/Users/Path/to/myApp/node_modules/tslint/lib/configuration.js:184:19)
    at loadConfigurationFromPath (/Users/Path/to/myApp/node_modules/tslint/lib/configuration.js:101:37)
    at loadConfigurationFromPath (/Users/Path/to/myApp/node_modules/tslint/lib/configuration.js:106:34)
    at Object.findConfiguration (/Users/Path/to/myApp/node_modules/tslint/lib/configuration.js:47:12)
    at processFile (/Users/Path/to/myApp/node_modules/tslint/lib/tslint-cli.js:131:41)
    at /Users/Path/to/myApp/node_modules/tslint/lib/tslint-cli.js:177:74
    at Array.forEach (native)
    at Object.<anonymous> (/Users/Path/to/myApp/node_modules/tslint/lib/tslint-cli.js:177:41)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)


[14:05:26]  lint finished in 685 ms
[14:05:30]  Error reading template file, "build/pages/user-select/user-select.html": Error: ENOENT: no such file or directory, open '/Users/Path/to/myApp/src/pages/user-select/build/pages/user-select/user-select.html'

[14:05:30]  Error reading template file, "build/pages/create-project/create-project.html": Error: ENOENT: no such file or directory, open '/Users/Path/to/myApp/src/pages/create-project/build/pages/create-project/create-project.html'

[14:05:30]  Error reading template file, "build/pages/title-select/title-select.html": Error: ENOENT: no such file or directory, open '/Users/Path/to/myApp/src/pages/title-select/build/pages/title-select/title-select.html'

[14:05:30]  bundle dev failed:  Could not resolve '@ionic/cloud-angular' from /Users/Path/to/myApp/src/pages/user-select/user-select.ts

[14:05:30]  Error: Could not resolve '@ionic/cloud-angular' from /Users/Path/to/myApp/src/pages/user-select/user-select.ts
    at Error (native)
    at /Users/Path/to/myApp/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:78:21
    at /Users/Path/to/myApp/node_modules/browser-resolve/index.js:265:24
    at /Users/Path/to/myApp/node_modules/resolve/lib/async.js:46:14
    at process (/Users/Path/to/myApp/node_modules/resolve/lib/async.js:173:43)
    at ondir (/Users/Path/to/myApp/node_modules/resolve/lib/async.js:188:17)
    at load (/Users/Path/to/myApp/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/Path/to/myApp/node_modules/resolve/lib/async.js:92:31)
    at /Users/Path/to/myApp/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:123:15)

Your system information:

Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.6.0
Xcode version: Xcode 8.0 Build version 8A218a

I installed the latest version of tslint-ionic-rules like the tutorial (https://www.youtube.com/watch?v=JZtEc1m6Y98) but still no luck. Also ionic keeps looking for this extra ‘build/pages’ directory. It also deletes my ‘www/index.html’ file, giving me this error in the browser:

Error: ENOENT: no such file or directory, open ‘/Users/Path/to/myApp/www/index.html’


#2

try upgrading ionic to latest version
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1


#3

I did already. This is my sys info:


#4

what is your npm version ?


#5

or try upgrading node to v6.7.0
I had same issue I upgrade node to v6.7.0 and ionic to 2.1 and it worked


#6

I upgraded. Still no luck