Skip to content
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

0.17.0-beta.28 dl-loader TypeError (windows 10) #2064

Closed
pocesar opened this issue Sep 5, 2016 · 5 comments
Closed

0.17.0-beta.28 dl-loader TypeError (windows 10) #2064

pocesar opened this issue Sep 5, 2016 · 5 comments

Comments

@pocesar
Copy link

pocesar commented Sep 5, 2016

Using jspm@beta, I'm having a problem (on Windows 10) when using jspm dl-loader

$ jspm dl-loader

err  TypeError: token.match is not a function
    at isGithubToken (C:\nodejs\node_modules\jspm\node_modules\jspm-github\github.js:81:16)
    at Object.GithubLocation (C:\nodejs\node_modules\jspm\node_modules\jspm-github\github.js:104:9)
    at Object.exports.load (C:\nodejs\node_modules\jspm\lib\registry.js:88:56)
    at dl (C:\nodejs\node_modules\jspm\lib\core.js:95:27)
    at C:\nodejs\node_modules\jspm\lib\core.js:168:12

err  Unable to load registry github

err  Error downloading loader files.

then I tried to see the current config

$ jspm config

err  TypeError: Cannot read property 'split' of undefined
    at GlobalConfigFile.set (C:\nodejs\node_modules\jspm\lib\config\global-config.js:127:23)
    at C:\nodejs\node_modules\jspm\cli.js:580:20
    at Object.<anonymous> (C:\nodejs\node_modules\jspm\cli.js:603:3)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Liftoff.<anonymous> (C:\nodejs\node_modules\jspm\jspm.js:35:5)
    at Liftoff.<anonymous> (C:\nodejs\node_modules\jspm\node_modules\liftoff\index.js:202:12)
    at Liftoff.<anonymous> (C:\nodejs\node_modules\jspm\node_modules\liftoff\index.js:169:7)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:592:11)

when I tried to do a cat ~/.jspm/config it obviously doesn't work in windows, although I manually created the .jspm folder in F:\Users\Paulo\.jspm, it doesn't seem to be accessing the folder, nor creating any files. the folder permissions are fine. but I don't know where it's placing the config file.

@guybedford
Copy link
Member

Any chance you could add a console.log to C:\nodejs\node_modules\jspm\node_modules\jspm-github\github.js:81:16 to see what the value of auth is.

//cc @tamird

@pocesar
Copy link
Author

pocesar commented Sep 7, 2016

found where it's writing the file: F:\Users\Paulo\AppData\Local\.jspm, so it seems it's not ~/.jspm on windows.

after I set the registry, I'm not getting the error anymore. not sure if relevant, but the github-cache folder is empty

auth var is showing the github token since then.

it seems that upgrading windows 10 to the "anniversary edition" wiped out the jspm config files, not sure. should I go ahead and try to delete the config file?

@guybedford
Copy link
Member

@pocesar that sounds like it might fix the problem then. If you're able to clarify what state change exactly you think caused the issue that would be interesting to hear if there is anything we can do.

@pocesar
Copy link
Author

pocesar commented Sep 13, 2016

@guybedford usually big windows updates messes with folder structure, file configurations, rename windows folder to windows.old, and so forth. symlinks also suffered, had some broken node_modules that were linked after the update, had to change my node_modules folder location.

I don't think it's a problem with JSPM, although looked like it at first. maybe check if the file actually exists, and emit an error in case it doesn't, when doing something that will try to lookup the github token from the file (showing the actual config file path for easier of inspection, and not assuming ~/.jspm/config)

@guybedford
Copy link
Member

@pocesar thanks for the update.

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