davinkevin / angularjs-jspm-seed

A example seed for AngularJS and JSPM project
Apache License 2.0
14 stars 5 forks source link

error on gulp build task (jspm unable to load registry %github%) #15

Closed simpixelated closed 8 years ago

simpixelated commented 8 years ago

First of all, awesome seed! I've been toying with JSPM and since I basically want to end up with your setup, I figured I might as well clone your repo. But, I ran into a problem. Using 7c59978c89af60210193f55317532fe4ef5426c9 on a fresh pull, ran npm start and made it through to npm build where it fails:

19:04:15] 'build-jspm' errored after 66 ms
[19:04:15] Error: Unable to load registry %github%
    at formatError (/Users/simpixelated/.node/lib/node_modules/gulp/bin/gulp.js:169:10)
    at Gulp.<anonymous> (/Users/simpixelated/.node/lib/node_modules/gulp/bin/gulp.js:195:15)
    at emitOne (events.js:82:20)
    at Gulp.emit (events.js:169:7)
    at Gulp.Orchestrator._emitTaskDone (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/index.js:264:8)
    at /Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/index.js:275:23
    at finish (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/lib/runTask.js:21:8)
    at module.exports (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/lib/runTask.js:36:10)
    at Gulp.Orchestrator._runTask (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/index.js:214:10)
[19:04:15] 'build' errored after 76 ms
[19:04:15] Error in plugin 'run-sequence'
Message:
    An error occured in task 'build-jspm'.

Maybe related to this? https://github.com/jspm/jspm-cli/issues/1198 (although it's not intermittent for me).

EDIT: running jspm install from the project folder also works fine, so it's something to do with the jspm builder. Also tried downgrading local jspm to 0.16.13.

davinkevin commented 8 years ago

No error of this kind. What is the JSPM version globally installed on your computer ?

The result of the build launch after a simple checkout is :

[07:37:35] Using gulpfile /private/tmp/angularjs-jspm-seed/gulpfile.babel.js
[07:37:35] Starting 'build'...
[07:37:35] Starting 'build-pre-clean'...
[07:37:35] Finished 'build-pre-clean' after 11 ms
[07:37:35] Starting 'build-jspm'...
[07:37:40] Finished 'build-jspm' after 5.73 s
[07:37:40] Starting 'build-js'...
[07:37:40] Starting 'build-css'...
[07:37:40] Starting 'build-fonts'...
[07:37:40] Finished 'build-fonts' after 8.19 ms
[07:37:50] Finished 'build-css' after 9.71 s
[07:37:50] Finished 'build-js' after 9.79 s
[07:37:50] Starting 'build-index-html'...
[07:37:50] gulp-inject 2 files into index.html.
[07:37:50] Finished 'build-index-html' after 93 ms
[07:37:50] Starting 'build-clean'...
[07:37:50] Finished 'build-clean' after 13 ms
[07:37:50] Finished 'build' after 16 s

It's maybe linked to the JSPM issue, but we don't face it in our different environnement

simpixelated commented 8 years ago

Here's the output of npm ls --global --depth 0

├── bower@1.6.5
├── cordova@5.3.3
├── eslint@1.10.3
├── gulp@3.9.0
├── ionic@1.7.7
├── UNMET PEER DEPENDENCY jasmine-core@*
├── jspm@0.16.15
├── karma@0.13.15
├── karma-jasmine@0.3.6
├── karma-phantomjs-launcher@0.2.1
├── npm@3.3.10
├── UNMET PEER DEPENDENCY phantomjs@>=1.9
├── serve@1.4.0
├── webpack@1.12.9
└── webpack-dev-server@1.14.0

I tried removing both node_modules and public/jspm_packages, npm cache clean, then ran npm start again. Ended up with the same error.

philiphendry commented 8 years ago

Is git on your path? I had this same error on a Windows machine and noticed git was available from either Powershell or Cmd. This may have been caused either by an upgrade of GitHub for Windows or the latest Windows 10 upgrade!

davinkevin commented 8 years ago

Thanks for your help @philiphendry because I've tried a lot of things and don't have any idea why this problem happen for @simpixelated . In my case, I am on MacOS and Linux, other user are on Windows so I don't suspect a problem coming from the OS...

simpixelated commented 8 years ago

I'm on OSX with git on my path.

davinkevin commented 8 years ago

:cry: I'll keep searching, but many people and ci work with the seed and don't have any problem, so it's hard to find..

simpixelated commented 8 years ago

I understand: edge cases in different environments are difficult to track down. I've since moved on to using webpack instead, but I'll be happy to test again if you make any updates. Thanks!

krotkiewicz commented 8 years ago

Today I had exactly the same problem. After digging deeper in jspm.Builder code, it occurs that netrc lib throws an exception because it was not able to parse my really old ~/.netrc file with heroku creds in it.

jspm thinks that there is no netrc lib (https://github.com/jspm/github/blob/master/github.js#L29) and then fails to use it (https://github.com/jspm/github/blob/master/github.js#L75)

In my case the solution was just to remove ~/.netrc file.

davinkevin commented 8 years ago

Thanks for the information 👍