avh4 / elm-upgrade

Upgrade Elm projects

Home Page:https://www.npmjs.com/package/elm-upgrade

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot work behind proxy

jackysee opened this issue · comments

I think simple-get doesn't support proxy? I'm on Windows.

>elm-upgrade
ERROR: Unable to connect to http://package.elm-lang.org.  Please try again later.
commented

The joy of node libraries. How much does this bother you? Would you be okay with reduced functionality?

I have tried to use got and it can go through proxy.

My projects are relatively small so I can do manual upgrade. See if others need this.

commented

I'll switch it over to got

commented

@jackysee #19 let me know if that works for you

Need to include caw to provide proxy agent to caw.
I've created #20 and tested in my environment.

Merged both. If it works on master, I'll publish a new version.

Published 0.18.7

Sorry, but is this issue resolved? I'm trying to run elm-upgrade@0.18.7 under here and getting this error. I'm even behind VPN but this is what I get (Bad.elm is supposed to not compile, same error occurs without that file)

INFO: Found elm at /usr/local/bin/elm
INFO: Found elm-package at /usr/local/bin/elm-package
INFO: Found Elm Platform 0.18.0
INFO: Found elm-format at /Users/nobell/.local/bin/elm-format
INFO: Found elm-format 0.5.2-alpha
INFO: Cleaning ./elm-stuff before upgrading
INFO: Changing elm-package.json#elm-version to "0.18.0 <= v < 0.19.0"
INFO: Removing all dependencies from elm-package.json to reinstall them
INFO: Installing latest version of elm-lang/core
INFO: Installing latest version of elm-lang/html
INFO: Upgrading *.elm files in ./
-- SYNTAX PROBLEM ---------------------------------------------------- ./Bad.elm

I ran into something unexpected when parsing your code!

4│ main =
   ^
I am looking for one of the following things:

    reserved word `exposing`
    reserved word `where`
    whitespace


{ Error: Command failed: /Users/nobell/.local/bin/elm-format --upgrade --yes --elm-version 0.18 .
-- SYNTAX PROBLEM ---------------------------------------------------- ./Bad.elm

I ran into something unexpected when parsing your code!

4│ main =
   ^
I am looking for one of the following things:

    reserved word `exposing`
    reserved word `where`
    whitespace



    at checkExecSyncError (child_process.js:490:13)
    at Object.execFileSync (child_process.js:510:13)
    at /usr/local/lib/node_modules/elm-upgrade/upgrade.js:173:20
    at Array.forEach (native)
    at main (/usr/local/lib/node_modules/elm-upgrade/upgrade.js:168:36)
    at /usr/local/lib/node_modules/elm-upgrade/upgrade.js:187:7
    at process._tickCallback (internal/process/next_tick.js:103:7)
  error: null,
  file: '/Users/nobell/.local/bin/elm-format',
  args:
   [ '/Users/nobell/.local/bin/elm-format',
     '--upgrade',
     '--yes',
     '--elm-version',
     '0.18',
     '.' ],
  options:
   { file: '/Users/nobell/.local/bin/elm-format',
     args:
      [ '/Users/nobell/.local/bin/elm-format',
        '--upgrade',
        '--yes',
        '--elm-version',
        '0.18',
        '.' ],
     envPairs:
      [ 'Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.E1goseqp3p/Render',
        'COLORFGBG=15;0',
        'COMMAND_MODE=unix2003',
        'HOME=/Users/nobell',
        'ITERM_PROFILE=Default',
        'ITERM_SESSION_ID=w0t3p0:848BEE99-612A-4A42-8B63-6862F2CFA3EB',
        'LANG=ko_KR.UTF-8',
        'LOGNAME=nobell',
        'PATH=/Users/nobell/.pyenv/shims:/Users/nobell/.fzf/bin:/usr/local/opt/fzf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/nobell/.local/bin:node_modules/.bin/',
        'PWD=/Users/nobell/workspace/node-elm-compiler/test/fixtures',
        'PYENV_SHELL=fish',
        'SECURITYSESSIONID=186a7',
        'SHELL=/usr/local/bin/fish',
        'SHLVL=1',
        'SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.tlGvS2DKIB/Listeners',
        'TERM=xterm-256color',
        'TERM_PROGRAM=iTerm.app',
        'TERM_PROGRAM_VERSION=3.0.12',
        'TERM_SESSION_ID=w0t3p0:848BEE99-612A-4A42-8B63-6862F2CFA3EB',
        'TMPDIR=/var/folders/xp/7w19rg1n2z3bv3bm7r6h8vgm0000gn/T/',
        'USER=nobell',
        'XPC_FLAGS=0x0',
        'XPC_SERVICE_NAME=0',
        '__CF_USER_TEXT_ENCODING=0x1F5:0x3:0x33',
        'fish_user_abbreviations=g git\u001ega git add\u001egaa git add --all\u001egapa git add --patch\u001egb git branch\u001egba git branch -a\u001egbl git blame -b -w\u001egbnm git branch --no-merged\u001egbr git branch --remote\u001egbs git bisect\u001egbsb git bisect bad\u001egbsg git bisect good\u001egbsr git bisect reset\u001egbss git bisect start\u001egc git commit -v\u001egc! git commit -v --amend\u001egca git commit -v -a\u001egca! git commit -v -a --amend\u001egcan! git commit -v -a -s --no-edit --amend\u001egcam git commit -a -m\u001egcb git checkout -b\u001egcf git config --list\u001egcl git clone --recursive\u001egclean git clean -fd\u001egcm git checkout master\u001egcmsg git commit -m\u001egco git checkout\u001egcount git shortlog -sn\u001egcp git cherry-pick\u001egcs git commit -S\u001egd git diff\u001egdca git diff --cached\u001egdct git describe --tags `git rev-list --tags --max-count=1`\u001egdt git diff-tree --no-commit-id --name-only -r\u001egdw git diff --word-diff\u001egf git fetch\u001egfa git fetch --all --prune\u001egfo git fetch origin\u001egg git gui citool\u001egga git gui citool --amend\u001eggpush git push origin HEAD\u001egignore git update-index --assume-unchanged\u001egignored git ls-files -v | grep "^[[:lower:]]"\u001egk \\gitk --all --branches\u001egl git pull\u001eglg git log --stat --color\u001eglgp git log --stat --color -p\u001eglgg git log --graph --color\u001eglgga git log --graph --decorate --all\u001eglgm git log --graph --max-count=10\u001eglo git log --oneline --decorate --color\u001eglol git log --graph --pretty=format:\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\' --abbrev-commit\u001eglola git log --graph --pretty=format:\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\' --abbrev-commit --all\u001eglog git log --oneline --decorate --color --graph\u001eglp _git_log_prettily\u001egm git merge\u001egmom git merge origin/master\u001egmt git mergetool --no-prompt\u001egmtvim git mergetool --no-prompt --tool=vimdiff\u001egmum git merge upstream/master\u001egp git push\u001egpd git push --dry-run\u001egpu git push upstream\u001egpv git push -v\u001egr git remote\u001egra git remote add\u001egrb git rebase\u001egrba git rebase --abort\u001egrbc git rebase --continue\u001egrbi git rebase -i\u001egrbm git rebase master\u001egrbs git rebase --skip\u001egrh git reset HEAD\u001egrhh git reset --hard HEAD\u001egrmv git remote rename\u001egrrm git remote remove\u001egrset git remote set-url\u001egru git reset --\u001egrup git remote update\u001egrv git remote -v\u001egsb git status -sb\u001egsd git svn dcommit\u001egsi git submodule init\u001egsps git show --pretty=short --show-signature\u001egsr git svn rebase\u001egss git status -s\u001egst git status\u001egsta git stash\u001egstaa git stash apply\u001egstd git stash drop\u001egstl git stash list\u001egstp git stash pop\u001egsts git stash show --text\u001egsu git submodule update\u001egts git tag -s\u001egtv git tag | sort -V\u001egunignore git update-index --no-assume-unchanged\u001egup git pull --rebase\u001egupv git pull --rebase -v\u001eglum git pull upstream master\u001egvt git verify-tag\u001egwch git whatchanged -p --abbrev-commit --pretty=medium\u001eg git\u001ega git add\u001egaa git add --all\u001egapa git add --patch\u001egb git branch\u001egba git branch -a\u001egbd git branch -d\u001egbl git blame -b -w\u001egbnm git branch --no-merged\u001egbr git branch --remote\u001egbs git bisect\u001egbsb git bisect bad\u001egbsg git bisect good\u001egbsr git bisect reset\u001egbss git bisect start\u001egc git commit -v\u001egc! git commit -v --amend\u001egca git commit -v -a\u001egca! git commit -v -a --amend\u001egcan! git commit -v -a -s --no-edit --amend\u001egcam git commit -a -m\u001egcb git checkout -b\u001egcf git config --list\u001egcl git clone --recursive\u001egclean git clean -fd\u001egcm git checkout master\u001egcmsg git commit -m\u001egco git checkout\u001egcount git shortlog -sn\u001egcp git cherry-pick\u001egcs git commit -S\u001egd git diff\u001egdca git diff --cached\u001egdct git describe --tags `git rev-list --tags --max-count=1`\u001egdt git diff-tree --no-commit-id --name-only -r\u001egdw git diff --word-diff\u001egf git fetch\u001egfa git fetch --all --prune\u001egfo git fetch origin\u001egg git gui citool\u001egga git gui citool --amend\u001eggpush git push origin HEAD\u001egignore git update-index --assume-unchanged\u001egignored git ls-files -v | grep ^[[:lower:]]\u001egk \\gitk --all --branches\u001egl git pull\u001eglg git log --stat --color\u001eglgp git log --stat --color -p\u001eglgg git log --graph --color\u001eglgga git log --graph --decorate --all\u001eglgm git log --graph --max-count=10\u001eglo git log --oneline --decorate --color\u001eglol git log --graph --pretty=format:\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\' --abbrev-commit\u001eglola git log --graph --pretty=format:\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\' --abbrev-commit --all\u001eglog git log --oneline --decorate --color --graph\u001eglp _git_log_prettily\u001egm git merge\u001egmom git merge origin/master\u001egmt git mergetool --no-prompt\u001egmtvim git mergetool --no-prompt --tool=vimdiff\u001egmum git merge upstream/master\u001egp git push\u001egpd git push --dry-run\u001egpu git push upstream\u001egpv git push -v\u001egr git remote\u001egra git remote add\u001egrb git rebase\u001egrba git rebase --abort\u001egrbc git rebase --continue\u001egrbi git rebase -i\u001egrbm git rebase master\u001egrbs git rebase --skip\u001egrh git reset HEAD\u001egrhh git reset --hard HEAD\u001egrmv git remote rename\u001egrrm git remote remove\u001egrset git remote set-url\u001egru git reset --\u001egrup git remote update\u001egrv git remote -v\u001egsb git status -sb\u001egsd git svn dcommit\u001egsi git submodule init\u001egsps git show --pretty=short --show-signature\u001egsr git svn rebase\u001egss git status -s\u001egst git status\u001egsta git stash\u001egstaa git stash apply\u001egstd git stash drop\u001egstl git stash list\u001egstp git stash pop\u001egsts git stash show --text\u001egsu git submodule update\u001egts git tag -s\u001egtv git tag | sort -V\u001egunignore git update-index --no-assume-unchanged\u001egup git pull --rebase\u001egupv git pull --rebase -v\u001eglum git pull upstream master\u001egvt git verify-tag\u001egwch git whatchanged -p --abbrev-commit --pretty=medium' ],
     stdio: [ [Object], [Object], [Object] ] },
  envPairs:
   [ 'Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.E1goseqp3p/Render',
     'COLORFGBG=15;0',
     'COMMAND_MODE=unix2003',
     'HOME=/Users/nobell',
     'ITERM_PROFILE=Default',
     'ITERM_SESSION_ID=w0t3p0:848BEE99-612A-4A42-8B63-6862F2CFA3EB',
     'LANG=ko_KR.UTF-8',
     'LOGNAME=nobell',
     'PATH=/Users/nobell/.pyenv/shims:/Users/nobell/.fzf/bin:/usr/local/opt/fzf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/nobell/.local/bin:node_modules/.bin/',
     'PWD=/Users/nobell/workspace/node-elm-compiler/test/fixtures',
     'PYENV_SHELL=fish',
     'SECURITYSESSIONID=186a7',
     'SHELL=/usr/local/bin/fish',
     'SHLVL=1',
     'SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.tlGvS2DKIB/Listeners',
     'TERM=xterm-256color',
     'TERM_PROGRAM=iTerm.app',
     'TERM_PROGRAM_VERSION=3.0.12',
     'TERM_SESSION_ID=w0t3p0:848BEE99-612A-4A42-8B63-6862F2CFA3EB',
     'TMPDIR=/var/folders/xp/7w19rg1n2z3bv3bm7r6h8vgm0000gn/T/',
     'USER=nobell',
     'XPC_FLAGS=0x0',
     'XPC_SERVICE_NAME=0',
     '__CF_USER_TEXT_ENCODING=0x1F5:0x3:0x33',
     'fish_user_abbreviations=g git\u001ega git add\u001egaa git add --all\u001egapa git add --patch\u001egb git branch\u001egba git branch -a\u001egbl git blame -b -w\u001egbnm git branch --no-merged\u001egbr git branch --remote\u001egbs git bisect\u001egbsb git bisect bad\u001egbsg git bisect good\u001egbsr git bisect reset\u001egbss git bisect start\u001egc git commit -v\u001egc! git commit -v --amend\u001egca git commit -v -a\u001egca! git commit -v -a --amend\u001egcan! git commit -v -a -s --no-edit --amend\u001egcam git commit -a -m\u001egcb git checkout -b\u001egcf git config --list\u001egcl git clone --recursive\u001egclean git clean -fd\u001egcm git checkout master\u001egcmsg git commit -m\u001egco git checkout\u001egcount git shortlog -sn\u001egcp git cherry-pick\u001egcs git commit -S\u001egd git diff\u001egdca git diff --cached\u001egdct git describe --tags `git rev-list --tags --max-count=1`\u001egdt git diff-tree --no-commit-id --name-only -r\u001egdw git diff --word-diff\u001egf git fetch\u001egfa git fetch --all --prune\u001egfo git fetch origin\u001egg git gui citool\u001egga git gui citool --amend\u001eggpush git push origin HEAD\u001egignore git update-index --assume-unchanged\u001egignored git ls-files -v | grep "^[[:lower:]]"\u001egk \\gitk --all --branches\u001egl git pull\u001eglg git log --stat --color\u001eglgp git log --stat --color -p\u001eglgg git log --graph --color\u001eglgga git log --graph --decorate --all\u001eglgm git log --graph --max-count=10\u001eglo git log --oneline --decorate --color\u001eglol git log --graph --pretty=format:\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\' --abbrev-commit\u001eglola git log --graph --pretty=format:\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\' --abbrev-commit --all\u001eglog git log --oneline --decorate --color --graph\u001eglp _git_log_prettily\u001egm git merge\u001egmom git merge origin/master\u001egmt git mergetool --no-prompt\u001egmtvim git mergetool --no-prompt --tool=vimdiff\u001egmum git merge upstream/master\u001egp git push\u001egpd git push --dry-run\u001egpu git push upstream\u001egpv git push -v\u001egr git remote\u001egra git remote add\u001egrb git rebase\u001egrba git rebase --abort\u001egrbc git rebase --continue\u001egrbi git rebase -i\u001egrbm git rebase master\u001egrbs git rebase --skip\u001egrh git reset HEAD\u001egrhh git reset --hard HEAD\u001egrmv git remote rename\u001egrrm git remote remove\u001egrset git remote set-url\u001egru git reset --\u001egrup git remote update\u001egrv git remote -v\u001egsb git status -sb\u001egsd git svn dcommit\u001egsi git submodule init\u001egsps git show --pretty=short --show-signature\u001egsr git svn rebase\u001egss git status -s\u001egst git status\u001egsta git stash\u001egstaa git stash apply\u001egstd git stash drop\u001egstl git stash list\u001egstp git stash pop\u001egsts git stash show --text\u001egsu git submodule update\u001egts git tag -s\u001egtv git tag | sort -V\u001egunignore git update-index --no-assume-unchanged\u001egup git pull --rebase\u001egupv git pull --rebase -v\u001eglum git pull upstream master\u001egvt git verify-tag\u001egwch git whatchanged -p --abbrev-commit --pretty=medium\u001eg git\u001ega git add\u001egaa git add --all\u001egapa git add --patch\u001egb git branch\u001egba git branch -a\u001egbd git branch -d\u001egbl git blame -b -w\u001egbnm git branch --no-merged\u001egbr git branch --remote\u001egbs git bisect\u001egbsb git bisect bad\u001egbsg git bisect good\u001egbsr git bisect reset\u001egbss git bisect start\u001egc git commit -v\u001egc! git commit -v --amend\u001egca git commit -v -a\u001egca! git commit -v -a --amend\u001egcan! git commit -v -a -s --no-edit --amend\u001egcam git commit -a -m\u001egcb git checkout -b\u001egcf git config --list\u001egcl git clone --recursive\u001egclean git clean -fd\u001egcm git checkout master\u001egcmsg git commit -m\u001egco git checkout\u001egcount git shortlog -sn\u001egcp git cherry-pick\u001egcs git commit -S\u001egd git diff\u001egdca git diff --cached\u001egdct git describe --tags `git rev-list --tags --max-count=1`\u001egdt git diff-tree --no-commit-id --name-only -r\u001egdw git diff --word-diff\u001egf git fetch\u001egfa git fetch --all --prune\u001egfo git fetch origin\u001egg git gui citool\u001egga git gui citool --amend\u001eggpush git push origin HEAD\u001egignore git update-index --assume-unchanged\u001egignored git ls-files -v | grep ^[[:lower:]]\u001egk \\gitk --all --branches\u001egl git pull\u001eglg git log --stat --color\u001eglgp git log --stat --color -p\u001eglgg git log --graph --color\u001eglgga git log --graph --decorate --all\u001eglgm git log --graph --max-count=10\u001eglo git log --oneline --decorate --color\u001eglol git log --graph --pretty=format:\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\' --abbrev-commit\u001eglola git log --graph --pretty=format:\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\' --abbrev-commit --all\u001eglog git log --oneline --decorate --color --graph\u001eglp _git_log_prettily\u001egm git merge\u001egmom git merge origin/master\u001egmt git mergetool --no-prompt\u001egmtvim git mergetool --no-prompt --tool=vimdiff\u001egmum git merge upstream/master\u001egp git push\u001egpd git push --dry-run\u001egpu git push upstream\u001egpv git push -v\u001egr git remote\u001egra git remote add\u001egrb git rebase\u001egrba git rebase --abort\u001egrbc git rebase --continue\u001egrbi git rebase -i\u001egrbm git rebase master\u001egrbs git rebase --skip\u001egrh git reset HEAD\u001egrhh git reset --hard HEAD\u001egrmv git remote rename\u001egrrm git remote remove\u001egrset git remote set-url\u001egru git reset --\u001egrup git remote update\u001egrv git remote -v\u001egsb git status -sb\u001egsd git svn dcommit\u001egsi git submodule init\u001egsps git show --pretty=short --show-signature\u001egsr git svn rebase\u001egss git status -s\u001egst git status\u001egsta git stash\u001egstaa git stash apply\u001egstd git stash drop\u001egstl git stash list\u001egstp git stash pop\u001egsts git stash show --text\u001egsu git submodule update\u001egts git tag -s\u001egtv git tag | sort -V\u001egunignore git update-index --no-assume-unchanged\u001egup git pull --rebase\u001egupv git pull --rebase -v\u001eglum git pull upstream master\u001egvt git verify-tag\u001egwch git whatchanged -p --abbrev-commit --pretty=medium' ],
  stderr: <Buffer 1b 5b 33 36 6d 2d 2d 20 53 59 4e 54 41 58 20 50 52 4f 42 4c 45 4d 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ... >,
  stdout: <Buffer 50 72 6f 63 65 73 73 69 6e 67 20 6d 75 6c 74 69 70 6c 65 20 66 69 6c 65 73 2e 2e 2e 0a 45 52 52 4f 52 53 0a>,
  pid: 32184,
  output:
   [ null,
     <Buffer 50 72 6f 63 65 73 73 69 6e 67 20 6d 75 6c 74 69 70 6c 65 20 66 69 6c 65 73 2e 2e 2e 0a 45 52 52 4f 52 53 0a>,
     <Buffer 1b 5b 33 36 6d 2d 2d 20 53 59 4e 54 41 58 20 50 52 4f 42 4c 45 4d 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ... > ],
  signal: null,
  status: 1 }
ERROR: Unable to connect to http://package.elm-lang.org.  Please try again later.

Also, elm-upgrade seems to upgrade elm-package.json even when the actuall upgrade wasn't successfully finished? I'm not sure if it's expected behavior, as it forces me to manually reset elm-packages.json every time when elm-upgrade fails.

Thank you for reading!