-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
version undefined after npm install #1088
Comments
Looks to be related to an old version gulp. |
No I installed gulp 3.9.0 locally and ran Sent from my iPhone
|
why are you running the bin with |
Why did you close the issue. Even if i edit the path on my azure machine and run gulp.cmd from appdata npm packages i have the same issue. Sent from my iPhone
|
I'm not able to reproduce this. Can you paste the output of this please?
|
Will do tomorrow morning. :) Sent from my iPhone
|
Yeah it became the afternoon 😄 here we go: PS D:\home\> mkdir gulp-test
Directory: D:\home
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 6/4/2015 1:09 PM gulp-test
PS D:\home> cd gulp-test
PS D:\home\gulp-test> node -v
v0.12.2
PS D:\home\gulp-test> npm -v
2.7.4
PS D:\home\gulp-test> npm install gulp
gulp@3.9.0 node_modules\gulp
├── pretty-hrtime@1.0.0
├── interpret@0.6.2
├── deprecated@0.0.1
├── archy@1.0.0
├── tildify@1.0.0 (user-home@1.1.1)
├── v8flags@2.0.5 (user-home@1.1.1)
├── minimist@1.1.1
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.0.1, supports-color@1.3.1, strip-ansi@2.0.1, has-ansi@1.0.3)
├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5)
├── semver@4.3.6
├── gulp-util@3.0.5 (array-differ@1.0.0, array-uniq@1.0.2, lodash._reevaluate@3.0.0, beeper@1.1.0, lodash._reescape@3.0.0, lodash._reinterpolate@3.0.0, object-assign@2.1.0, replace-ext@0.0.1, vinyl@0.4.6, lodash.template@3.6.1, through2@0.6.5, multipipe@0.1.2, dateformat@1.0.11)
├── liftoff@2.1.0 (extend@2.0.1, rechoir@0.6.1, flagged-respawn@0.3.1, resolve@1.1.6, findup-sync@0.2.1)
└── vinyl-fs@0.3.13 (graceful-fs@3.0.8, strip-bom@1.0.0, defaults@1.0.2, vinyl@0.4.6, mkdirp@0.5.1, through2@0.6.5, glob-stream@3.1.18, glob-watcher@0.0.6)
PS D:\home\gulp-test> echo $null >> gulpfile.js
PS D:\home\gulp-test> node .\node_modules\gulp\bin\gulp
D:\home\gulp-test\node_modules\gulp\node_modules\semver\semver.js:281
throw new TypeError('Invalid Version: ' + version);
^
TypeError: Invalid Version: undefined
at new SemVer (D:\home\gulp-test\node_modules\gulp\node_modules\semver\semver.js:281:11)
at SemVer.compare (D:\home\gulp-test\node_modules\gulp\node_modules\semver\semver.js:348:13)
at compare (D:\home\gulp-test\node_modules\gulp\node_modules\semver\semver.js:571:31)
at Function.gt (D:\home\gulp-test\node_modules\gulp\node_modules\semver\semver.js:600:10)
at Liftoff.handleArguments (D:\home\gulp-test\node_modules\gulp\bin\gulp.js:99:14)
at Liftoff.<anonymous> (D:\home\gulp-test\node_modules\gulp\node_modules\liftoff\index.js:192:16)
at module.exports (D:\home\gulp-test\node_modules\gulp\node_modules\liftoff\node_modules\flagged-respawn\index.js:17:3)
at Liftoff.<anonymous> (D:\home\gulp-test\node_modules\gulp\node_modules\liftoff\index.js:185:9)
at D:\home\gulp-test\node_modules\gulp\node_modules\liftoff\index.js:159:9
at D:\home\gulp-test\node_modules\gulp\node_modules\v8flags\index.js:79:12
PS D:\home\gulp-test> |
Then when I run this: PS D:\home\gulp-test> node .\node_modules\gulp\bin\gulp -v
[13:15:10] CLI version 3.9.0
[13:15:10] Local version 3.9.0
PS D:\home\gulp-test> node .\node_modules\gulp\bin\gulp
[13:15:31] Using gulpfile D:\home\gulp-test\gulpfile.js
[13:15:33] Task 'default' is not in your gulpfile
[13:15:33] Please check the documentation for proper gulpfile formatting gulp magically fixes it self 😄 |
Still unable to reproduce this.
What shell are you using? I'm using PowerShell above. |
Using powershell as well
|
It's apparently not a very wide spread issue. And I've found a work around. @tkellen thanks for looking into it! On another machine where the only difference is the powershell version it also works. |
@albertjan what was your work around? I'm having the same issue (except this is on my local machine and not Azure). I have to run gulp -v each time before I run gulp in order for it to work. |
@roddharris that was my work around. 😄 |
I was getting the same error, but due to a slightly different problem. I had gulp installed globally but not locally. That doesn't seem to be @albertjan's issue, but in case anyone else is running into this issue or if it sheds some light on the other issue, here's what I was seeing. With gulp installed globally, running gulp when it's not installed in node_modules consistently produces the error. Running npm install gulp resolves the issue. To illustrate:
And the fix:
|
I can't seem to resolve this issue and have tried all of these work arounds. then I try to npm install gulp or npm install --save-dev gulp and still get help! |
Also reported over at @projectkudu projectkudu/kudu#1573
The first time after we do
npm install
we see this error:If we run
gulp --version
beforegulp
it works.The text was updated successfully, but these errors were encountered: