Skip to content

Error: Cannot find module 'jshint/src/cli' #1800

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

Closed
aabm00 opened this issue Apr 20, 2016 · 6 comments
Closed

Error: Cannot find module 'jshint/src/cli' #1800

aabm00 opened this issue Apr 20, 2016 · 6 comments

Comments

@aabm00
Copy link

aabm00 commented Apr 20, 2016

Item Version
generator-angular-fullstack 3.5
Node 4.2.3
npm 3.7.5
Operating System Windows 7
etc etc
Item Answer
Transpiler TypeScript
Markup HTML
CSS CSS
Router ui-router
Build Tool Gulp
Client Tests Jasmine
DB MongoDB
Auth Y
etc socket.io

I have just created a new project and without changing nothing, I have executed gulp serve and get this error:

D:\002_IOT\WS_IOT\iotfs35>gulp serve
[18:29:46] Requiring external module babel-register
module.js:339
throw err;
^

Error: Cannot find module 'jshint/src/cli'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (D:\002_IOT\WS_IOT\iotfs35\node_modules\gulp-jshint\sr
c\extract.js:1:79)
at Module._compile (module.js:435:26)
at Module._extensions..js (module.js:442:10)
at Object.require.extensions.(anonymous function) [as .js](D:002_IOTWS_IO
Tiotfs35node_modulesbabel-registerlibnode.js:134:7)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (D:\002_IOT\WS_IOT\iotfs35\node_modules\gulp-jshint\sr
c\index.js:2:15)
at Module._compile (module.js:435:26)
at Module._extensions..js (module.js:442:10)
at Object.require.extensions.(anonymous function) [as .js](D:002_IOTWS_IO
Tiotfs35node_modulesbabel-registerlibnode.js:134:7)

@Awk34
Copy link
Member

Awk34 commented Apr 20, 2016

try re-installing gulp-jshint/jshint

@aabm00
Copy link
Author

aabm00 commented Apr 21, 2016

Hi @Awk34

I have read the #1731 and tried the differents solutions over there but nothing works for me. I have excuted.

npm install jshint gulp-jshint --save-dev

Everything is installed right "gulp-jshint": "2.0.0" and "jshint": "2.9.2" the only thing is that I get some warns at the end:

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fseve
[email protected]
npm WARN [email protected] requires a peer of kerberos@~0.0 but none was insta
lled.

Then when I try to execute gulp serve I get this errors:

D:\002_IOT\WS_IOT\iotfs35>gulp serve
[10:33:02] Requiring external module babel-register
[10:33:12] Using gulpfile D:\002_IOT\WS_IOT\iotfs35\gulpfile.babel.js
[10:33:14] Starting 'serve'...
[10:33:14] Starting 'clean:tmp'...
[10:33:14] Starting 'constant'...
[10:33:15] Starting 'tsd'...
[10:33:16] Finished 'clean:tmp' after 1.83 s
[10:33:16] Finished 'constant' after 1.88 s
[10:33:23] Finished 'tsd' after 8.47 s
[10:33:23] Starting 'lint:scripts'...
[10:33:23] Starting 'lint:scripts:client'...
[10:33:23] Starting 'lint:scripts:server'...
[10:33:23] Starting 'inject'...
[10:33:23] 'inject' errored after 474 µs
[10:33:23] Error: Task inject:css is listed more than once. This is probably a t
ypo.
at D:\002_IOT\WS_IOT\iotfs35\node_modules\run-sequence\index.js:24:11
at Array.forEach (native)
at verifyTaskSets (D:\002_IOT\WS_IOT\iotfs35\node_modules\run-sequence\index
.js:13:11)
at D:\002_IOT\WS_IOT\iotfs35\node_modules\run-sequence\index.js:32:4
at Array.forEach (native)
at verifyTaskSets (D:\002_IOT\WS_IOT\iotfs35\node_modules\run-sequence\index
.js:13:11)
at runSequence (D:\002_IOT\WS_IOT\iotfs35\node_modules\run-sequence\index.js
:94:2)
at Gulp. (gulpfile.babel.js:197:5)
at module.exports (D:\002_IOT\WS_IOT\iotfs35\node_modules\orchestrator\lib\r
unTask.js:34:7)
at Gulp.Orchestrator._runTask (D:\002_IOT\WS_IOT\iotfs35\node_modules\orches
trator\index.js:273:3)
at Gulp.Orchestrator._runStep (D:\002_IOT\WS_IOT\iotfs35\node_modules\orches
trator\index.js:214:10)
at Gulp.Orchestrator.start (D:\002_IOT\WS_IOT\iotfs35\node_modules\orchestra
tor\index.js:134:8)
at runNextSet (D:\002_IOT\WS_IOT\iotfs35\node_modules\run-sequence\index.js:
88:16)
at runSequence (D:\002_IOT\WS_IOT\iotfs35\node_modules\run-sequence\index.js
:99:2)
at Gulp. (gulpfile.babel.js:295:33)
at module.exports (D:\002_IOT\WS_IOT\iotfs35\node_modules\orchestrator\lib\r
unTask.js:34:7)
[10:33:23] 'serve' errored after 8.86 s
[10:33:23] Error in plugin 'run-sequence'
Message:
An error occured in task 'inject'.
[10:33:23] 'lint:scripts' errored after 177 ms
[10:33:23] Error in plugin 'run-sequence'
Message:
An error occured in task 'serve'.
[10:33:23] 'lint:scripts' errored after 183 ms
[10:33:23] Error in plugin 'run-sequence'
Message:
An error occured in task 'inject'.
[10:33:27] Finished 'lint:scripts:client' after 4.19 s
[10:33:27] Finished 'lint:scripts:server' after 4.27 s

@Awk34
Copy link
Member

Awk34 commented Apr 21, 2016

Error: Task inject:css is listed more than once.: your Gulp file has two inject:css tasks; delete one of them.

@aabm00
Copy link
Author

aabm00 commented Apr 21, 2016

You were right

In the gulpfile-babel.js the *inject:css * were duplicated in this line:

gulp.task('inject', cb => {
runSequence(['inject:js', 'inject:css', 'inject:css', 'inject:tsconfig'], cb);
});

I deleted one of them and executed gulp serve and the project worked but the views in the browser were without styles (not CSS). I only deleted the duplicate inject:css. What's wrong?
I also got some typescript errors in the executio (see bellow). Why I get this errors? I need to install some library?

D:\002_IOT\WS_IOT\iotfs35_gulp>gulp serve
[17:35:22] Requiring external module babel-register
[17:35:33] Using gulpfile D:\002_IOT\WS_IOT\iotfs35_gulp\gulpfile.babel.js
[17:35:34] Starting 'serve'...
[17:35:34] Starting 'clean:tmp'...
[17:35:34] Starting 'constant'...
[17:35:34] Starting 'tsd'...
[17:35:36] Finished 'constant' after 1.89 s
[17:35:36] Finished 'clean:tmp' after 2.1 s
[17:35:40] Finished 'tsd' after 5.52 s
[17:35:40] Starting 'lint:scripts'...
[17:35:40] Starting 'lint:scripts:client'...
[17:35:40] Starting 'lint:scripts:server'...
[17:35:40] Starting 'inject'...
[17:35:40] Starting 'inject:js'...
[17:35:40] Starting 'inject:css'...
[17:35:40] Starting 'inject:tsconfig'...
[17:35:41] gulp-inject Nothing to inject into index.html.
[17:35:42] Finished 'inject:css' after 1.58 s
[17:35:42] gulp-inject 25 files into index.html.
[17:35:42] gulp-inject 30 files into tsconfig.client.json.
[17:35:43] Finished 'inject:js' after 2.76 s
[17:35:43] Finished 'inject:tsconfig' after 3.05 s
[17:35:43] Finished 'inject' after 3.13 s
[17:35:44] Finished 'lint:scripts:client' after 4.47 s
[17:35:45] Finished 'lint:scripts:server' after 4.61 s
[17:35:45] Finished 'lint:scripts' after 4.65 s
[17:35:45] Starting 'wiredep:client'...
[17:35:45] Finished 'wiredep:client' after 123 ms
[17:35:45] Starting 'constant'...
[17:35:45] Starting 'copy:constant'...
[17:35:45] Starting 'styles'...
[17:35:45] Finished 'constant' after 264 ms
[17:35:45] Finished 'copy:constant' after 258 ms
[17:35:45] Starting 'transpile:client'...
[17:35:45] Finished 'styles' after 739 ms
client\app\account\login\login.controller.ts(5,10): error TS2339: Property 'user
' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(6,10): error TS2339: Property 'erro
rs' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(7,10): error TS2339: Property 'subm
itted' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(9,10): error TS2339: Property 'Auth
' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(10,10): error TS2339: Property '$st
ate' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(14,10): error TS2339: Property 'sub
mitted' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(17,12): error TS2339: Property 'Aut
h' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(18,21): error TS2339: Property 'use
r' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(19,24): error TS2339: Property 'use
r' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(23,14): error TS2339: Property '$st
ate' does not exist on type 'LoginController'.
client\app\account\login\login.controller.ts(26,14): error TS2339: Property 'err
ors' does not exist on type 'LoginController'.
client\app\account\settings\settings.controller.ts(5,10): error TS2339: Property
'errors' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(6,10): error TS2339: Property
'submitted' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(8,10): error TS2339: Property
'Auth' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(12,10): error TS2339: Propert
y 'submitted' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(15,12): error TS2339: Propert
y 'Auth' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(15,37): error TS2339: Propert
y 'user' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(15,60): error TS2339: Propert
y 'user' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(17,16): error TS2339: Propert
y 'message' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(21,16): error TS2339: Propert
y 'errors' does not exist on type 'SettingsController'.
client\app\account\settings\settings.controller.ts(22,16): error TS2339: Propert
y 'message' does not exist on type 'SettingsController'.
client\app\account\signup\signup.controller.ts(11,10): error TS2339: Property 'A
uth' does not exist on type 'SignupController'.
client\app\account\signup\signup.controller.ts(12,10): error TS2339: Property '$
state' does not exist on type 'SignupController'.
client\app\account\signup\signup.controller.ts(19,12): error TS2339: Property 'A
uth' does not exist on type 'SignupController'.
client\app\account\signup\signup.controller.ts(20,25): error TS2339: Property 'n
ame' does not exist on type '{}'.
client\app\account\signup\signup.controller.ts(21,26): error TS2339: Property 'e
mail' does not exist on type '{}'.
client\app\account\signup\signup.controller.ts(22,29): error TS2339: Property 'p
assword' does not exist on type '{}'.
client\app\account\signup\signup.controller.ts(26,14): error TS2339: Property '$
state' does not exist on type 'SignupController'.
client\app\admin\admin.controller.ts(8,10): error TS2339: Property 'users' does
not exist on type 'AdminController'.
client\app\admin\admin.controller.ts(13,10): error TS2339: Property 'users' does
not exist on type 'AdminController'.
client\app\admin\admin.controller.ts(13,28): error TS2339: Property 'users' does
not exist on type 'AdminController'.
client\app\main\main.controller.ts(8,10): error TS2339: Property '$http' does no
t exist on type 'MainController'.
client\app\main\main.controller.ts(9,10): error TS2339: Property 'socket' does n
ot exist on type 'MainController'.
client\app\main\main.controller.ts(10,10): error TS2339: Property 'awesomeThings
' does not exist on type 'MainController'.
client\app\main\main.controller.ts(18,10): error TS2339: Property '$http' does n
ot exist on type 'MainController'.
client\app\main\main.controller.ts(19,12): error TS2339: Property 'awesomeThings
' does not exist on type 'MainController'.
client\app\main\main.controller.ts(20,12): error TS2339: Property 'socket' does
not exist on type 'MainController'.
client\app\main\main.controller.ts(20,45): error TS2339: Property 'awesomeThings
' does not exist on type 'MainController'.
client\app\main\main.controller.ts(25,14): error TS2339: Property 'newThing' doe
s not exist on type 'MainController'.
client\app\main\main.controller.ts(26,12): error TS2339: Property '$http' does n
ot exist on type 'MainController'.
client\app\main\main.controller.ts(26,51): error TS2339: Property 'newThing' doe
s not exist on type 'MainController'.
client\app\main\main.controller.ts(27,12): error TS2339: Property 'newThing' doe
s not exist on type 'MainController'.
client\app\main\main.controller.ts(32,10): error TS2339: Property '$http' does n
ot exist on type 'MainController'.
client\app\main\main.controller.ts(37,4): error TS2339: Property 'component' doe
s not exist on type 'IModule'.
client\components\auth\auth.service.ts(31,30): error TS2339: Property '$promise'
does not exist on type '{}'.
client\components\auth\auth.service.ts(81,52): error TS2339: Property 'id' does
not exist on type '{}'.
client\components\auth\auth.service.ts(104,21): error TS2339: Property '$promise
' does not exist on type '{}'.
client\components\auth\auth.service.ts(149,36): error TS2339: Property 'role' do
es not exist on type '{}'.
client\components\mongoose-error\mongoose-error.directive.ts(12,45): error TS233
9: Property '$setValidity' does not exist on type '{}'.
client\components\navbar\navbar.controller.ts(14,10): error TS2339: Property 'is
LoggedIn' does not exist on type 'NavbarController'.
client\components\navbar\navbar.controller.ts(15,10): error TS2339: Property 'is
Admin' does not exist on type 'NavbarController'.
client\components\navbar\navbar.controller.ts(16,10): error TS2339: Property 'ge
tCurrentUser' does not exist on type 'NavbarController'.
[17:35:51] TypeScript: 52 semantic errors
[17:35:51] TypeScript: emit succeeded (with errors)
[17:35:51] Finished 'transpile:client' after 6.34 s
[17:35:51] Starting 'start:server'...
[17:35:51] Finished 'start:server' after 30 ms
[17:35:51] Starting 'start:client'...
[nodemon] 1.9.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: D:\002_IOT\WS_IOT\iotfs35_gulp\server/*
/_
[nodemon] starting node server
Express server listening on 9000, in development mode
[17:36:01] Finished 'start:client' after 9.59 s
[17:36:01] Starting 'watch'...
finished populating users
[17:36:02] Finished 'watch' after 1.26 s
[17:36:02] Finished 'serve' after 28 s
GET /api/users/me 401 25.610 ms - -
SocketIO / [127.0.0.1:63449] CONNECTED
GET /api/things 200 29.606 ms - -

@aabm00
Copy link
Author

aabm00 commented Apr 21, 2016

I have seen other post with the same problem about the iinject:css duplicated ,#1504, #1752, #1760 and #1747, and in this last one you gave a solution, but it looks that isn't still fixed.
Is this problem a bug?

@Awk34
Copy link
Member

Awk34 commented Apr 21, 2016

The last PR you mentioned hasn't been merged yet. Should be fixed in 3.6.0 release, which I plan on making today.

@Awk34 Awk34 closed this as completed Apr 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants