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

Unable to migrate packages, unmatched single quote error #1948

Closed
karanrajpal14 opened this issue Nov 21, 2018 · 4 comments
Closed

Unable to migrate packages, unmatched single quote error #1948

karanrajpal14 opened this issue Nov 21, 2018 · 4 comments

Comments

@karanrajpal14
Copy link

  • Operating system and version: Ubuntu 16.04

  • nvm debug output:

nvm --version: v0.33.8
$SHELL: /bin/zsh
$HOME: /home/karan
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.1.1 (x86_64-ubuntu-linux-gnu)'
uname -a: 'Linux 4.15.0-39-generic #42~16.04.1-Ubuntu SMP Wed Oct 24 17:09:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux'
OS version: Ubuntu 16.04.5 LTS  
curl: /usr/bin/curl, curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.11 libidn/1.32 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.17.1 built on linux-gnu.
git: /usr/bin/git, git version 2.7.4
grep: grep: aliased to grep  --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn} (grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}), grep (GNU grep) 2.25
awk: not an option: --version
awk: /usr/bin/awk, 
sed: /bin/sed, sed (GNU sed) 4.2.2
cut: /usr/bin/cut, cut (GNU coreutils) 8.25
basename: /usr/bin/basename, basename (GNU coreutils) 8.25
rm: /bin/rm, rm (GNU coreutils) 8.25
mkdir: /bin/mkdir, mkdir (GNU coreutils) 8.25
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.7.0-git
nvm current: v8.11.4
which node: $NVM_DIR/versions/node/v8.11.4/bin/node
which iojs: iojs not found
which npm: $NVM_DIR/versions/node/v8.11.4/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v8.11.4
npm root -g: $NVM_DIR/versions/node/v8.11.4/lib/node_modules
  • nvm ls output:
->      v8.11.4
        v8.13.0
        v10.9.0
       v10.13.0
default -> 8.11.4 (-> v8.11.4)
stable -> 9.11.2 (-> N/A)
node -> stable (-> N/A) (default)
iojs -> N/A (default)
lts/* -> lts/dubnium (-> v10.13.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.14.4 (-> N/A)
lts/carbon -> v8.13.0
lts/dubnium -> v10.13.0
  • How did you install nvm? (e.g. install script in readme, Homebrew):
    Used the install script, iirc

  • What steps did you perform?

Installed v8.13 and tried to migrate packages from 8.11.4
Installed using nvm install v8.13.0
Then I wanted to migrate my packages using nvm reinstall v8.11.4

  • What happened?
nvm reinstall-packages v8.11.4
VERSION=''
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
Reinstalling global packages from v8.11.4...
npm WARN deprecated mdxc@1.1.2: MDXC
npm WARN deprecated now-cli@0.0.0: Please use now instead, the current package is not maintained.
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "+--": Tags may not have any characters that encodeURIComponent encodes.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/karan/.npm/_logs/2018-11-21T17_19_22_475Z-debug.log
Linking global packages from v8.11.4...

Here's the output of the log:

0 info it worked if it ends with ok
1 verbose cli [ '/home/karan/.nvm/versions/node/v8.13.0/bin/node',
1 verbose cli   '/home/karan/.nvm/versions/node/v8.13.0/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   '--quiet',
1 verbose cli   '@11ty/eleventy@0.5.4',
1 verbose cli   'branch-diff@1.7.0',
1 verbose cli   'create-react-app@2.1.1',
1 verbose cli   'david@11.0.0',
1 verbose cli   'fast-cli@2.2.0',
1 verbose cli   'gatsby@2.0.37',
1 verbose cli   'imagemin-cli@3.0.0',
1 verbose cli   'localtunnel@1.9.1',
1 verbose cli   'markcat@0.1.1',
1 verbose cli   'mdx-go@2.0.0-29',
1 verbose cli   'mdxc@1.1.2',
1 verbose cli   'netlify-deploy@0.0.2',
1 verbose cli   'node-nightly@1.7.3',
1 verbose cli   'now@12.1.3',
1 verbose cli   'now-cli@0.0.0',
1 verbose cli   'npm-check@5.9.0',
1 verbose cli   '+--',
1 verbose cli   'error:',
1 verbose cli   'ENOENT:',
1 verbose cli   'no',
1 verbose cli   'such',
1 verbose cli   'file',
1 verbose cli   'or',
1 verbose cli   'directory,',
1 verbose cli   'stat' ]
2 info using npm@6.4.1
3 info using node@v8.13.0
4 verbose npm-session 2280ab12556662b0
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/@11ty%2feleventy 41ms (from cache)
8 http fetch GET 200 https://registry.npmjs.org/branch-diff 38ms (from cache)
9 http fetch GET 200 https://registry.npmjs.org/create-react-app 37ms (from cache)
10 http fetch GET 200 https://registry.npmjs.org/david 38ms (from cache)
11 http fetch GET 200 https://registry.npmjs.org/fast-cli 37ms (from cache)
12 http fetch GET 200 https://registry.npmjs.org/imagemin-cli 40ms (from cache)
13 http fetch GET 200 https://registry.npmjs.org/localtunnel 39ms (from cache)
14 http fetch GET 200 https://registry.npmjs.org/markcat 39ms (from cache)
15 http fetch GET 200 https://registry.npmjs.org/mdx-go 40ms (from cache)
16 http fetch GET 200 https://registry.npmjs.org/gatsby 50ms (from cache)
17 silly pacote version manifest for @11ty/eleventy@0.5.4 fetched in 134ms
18 silly pacote version manifest for branch-diff@1.7.0 fetched in 123ms
19 silly pacote version manifest for create-react-app@2.1.1 fetched in 123ms
20 silly pacote version manifest for david@11.0.0 fetched in 123ms
21 silly pacote version manifest for fast-cli@2.2.0 fetched in 125ms
22 silly pacote version manifest for imagemin-cli@3.0.0 fetched in 124ms
23 silly pacote version manifest for localtunnel@1.9.1 fetched in 125ms
24 silly pacote version manifest for markcat@0.1.1 fetched in 125ms
25 silly pacote version manifest for mdx-go@2.0.0-29 fetched in 126ms
26 silly pacote version manifest for gatsby@2.0.37 fetched in 128ms
27 http fetch GET 200 https://registry.npmjs.org/mdxc 21ms (from cache)
28 http fetch GET 200 https://registry.npmjs.org/netlify-deploy 20ms (from cache)
29 http fetch GET 200 https://registry.npmjs.org/node-nightly 20ms (from cache)
30 http fetch GET 200 https://registry.npmjs.org/now-cli 19ms (from cache)
31 http fetch GET 200 https://registry.npmjs.org/npm-check 19ms (from cache)
32 http fetch GET 200 https://registry.npmjs.org/now 24ms (from cache)
33 http fetch GET 200 https://registry.npmjs.org/no 35ms (from cache)
34 http fetch GET 200 https://registry.npmjs.org/such 33ms (from cache)
35 http fetch GET 200 https://registry.npmjs.org/or 32ms (from cache)
36 http fetch GET 200 https://registry.npmjs.org/file 32ms (from cache)
37 silly pacote version manifest for mdxc@1.1.2 fetched in 42ms
38 warn deprecated mdxc@1.1.2: MDXC
39 silly pacote version manifest for netlify-deploy@0.0.2 fetched in 42ms
40 silly pacote version manifest for node-nightly@1.7.3 fetched in 42ms
41 silly pacote version manifest for now-cli@0.0.0 fetched in 41ms
42 warn deprecated now-cli@0.0.0: Please use now instead, the current package is not maintained.
43 silly pacote version manifest for now@12.1.3 fetched in 44ms
44 silly pacote version manifest for npm-check@5.9.0 fetched in 42ms
45 silly pacote tag manifest for such@latest fetched in 39ms
46 silly pacote tag manifest for or@latest fetched in 38ms
47 silly pacote tag manifest for no@latest fetched in 44ms
48 silly pacote tag manifest for file@latest fetched in 40ms
49 http fetch GET 200 https://registry.npmjs.org/stat 6ms (from cache)
50 silly pacote tag manifest for stat@latest fetched in 7ms
51 timing stage:rollbackFailedOptional Completed in 1ms
52 timing stage:runTopLevelLifecycles Completed in 308ms
53 verbose stack Error: Invalid tag name "+--": Tags may not have any characters that encodeURIComponent encodes.
53 verbose stack     at invalidTagName (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:87:15)
53 verbose stack     at fromRegistry (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:290:13)
53 verbose stack     at resolve (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:77:12)
53 verbose stack     at npa (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:48:10)
53 verbose stack     at /home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/lib/install/deps.js:209:14
53 verbose stack     at /home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
53 verbose stack     at Array.forEach (<anonymous>)
53 verbose stack     at /home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
53 verbose stack     at Array.forEach (<anonymous>)
53 verbose stack     at asyncMap (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
53 verbose stack     at exports.getAllMetadata (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/lib/install/deps.js:206:3)
53 verbose stack     at Installer.loadArgMetadata (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/lib/install.js:360:3)
53 verbose stack     at Installer.readGlobalPackageData (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/lib/install.js:658:8)
53 verbose stack     at Array.<anonymous> (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
53 verbose stack     at LOOP (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
53 verbose stack     at chain (/home/karan/.nvm/versions/node/v8.13.0/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
54 verbose cwd /home/karan/projects/coffeedale-mockups
55 verbose Linux 4.15.0-39-generic
56 verbose argv "/home/karan/.nvm/versions/node/v8.13.0/bin/node" "/home/karan/.nvm/versions/node/v8.13.0/bin/npm" "install" "-g" "--quiet" "@11ty/eleventy@0.5.4" "branch-diff@1.7.0" "create-react-app@2.1.1" "david@11.0.0" "fast-cli@2.2.0" "gatsby@2.0.37" "imagemin-cli@3.0.0" "localtunnel@1.9.1" "markcat@0.1.1" "mdx-go@2.0.0-29" "mdxc@1.1.2" "netlify-deploy@0.0.2" "node-nightly@1.7.3" "now@12.1.3" "now-cli@0.0.0" "npm-check@5.9.0" "+--" "error:" "ENOENT:" "no" "such" "file" "or" "directory," "stat"
57 verbose node v8.13.0
58 verbose npm  v6.4.1
59 error code EINVALIDTAGNAME
60 error Invalid tag name "+--": Tags may not have any characters that encodeURIComponent encodes.
61 verbose exit [ 1, true ]
  • What did you expect to happen?
    No errors while reinstalling
    Also, when I type nvm reinstall v8.11.4 I immediately see VERSION='' is this intended?

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?
    Yes, but nothing that should be bothering this.

@aliciahogue
Copy link

I had a similar issue and realized I had a random symlink in my node_modules folder for the node version I was trying to reinstall from. Removing that fixed the issue.

@karanrajpal14
Copy link
Author

@aliciahogue I'm sorry but I don't quite understand, how do I find the symlink? Mind helping me a bit?

@vkyrychenko
Copy link

I had a similar issue. In the debug log I had the following error:

Debug
25 verbose stack Error: Invalid tag name ">=": Tags may not have any characters that encodeURIComponent encodes.
25 verbose stack     at invalidTagName (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:87:15)
25 verbose stack     at fromRegistry (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:290:13)
25 verbose stack     at resolve (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:77:12)
25 verbose stack     at npa (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:48:10)
25 verbose stack     at /Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/lib/install/deps.js:222:14
25 verbose stack     at /Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
25 verbose stack     at Array.forEach (<anonymous>)
25 verbose stack     at /Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
25 verbose stack     at Array.forEach (<anonymous>)
25 verbose stack     at asyncMap (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
25 verbose stack     at exports.getAllMetadata (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/lib/install/deps.js:219:3)
25 verbose stack     at Installer.loadArgMetadata (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/lib/install.js:360:3)
25 verbose stack     at Installer.readGlobalPackageData (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/lib/install.js:658:8)
25 verbose stack     at Array.<anonymous> (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
25 verbose stack     at LOOP (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
25 verbose stack     at chain (/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
26 verbose cwd /Users/v.kyrychenko
27 verbose Darwin 18.6.0
28 verbose argv "/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/bin/node" "/Users/v.kyrychenko/.nvm/versions/node/v10.16.0/bin/npm" "install" "-g" "--quiet" "babel-eslint@10.0.1" "cordova@8.0.0" "eslint@>=" "husky@1.3.1" "jsdoc@3.5.5" "knex@0.15.2" "lerna@3.13.0" "react-devtools@3.6.1" "react-native-cli@2.0.1"
29 verbose node v10.16.0
30 verbose npm  v6.9.0
31 error code EINVALIDTAGNAME
32 error Invalid tag name ">=": Tags may not have any characters that encodeURIComponent encodes.

Then, I've tried to check globally installed packages:

npm list -g --depth 0
/usr/local/lib
-- babel-eslint@10.0.1
-- cordova@8.0.0
-- UNMET PEER DEPENDENCY eslint@>= 4.12.1
-- husky@1.3.1
-- jsdoc@3.5.5
-- knex@0.15.2
-- lerna@3.13.0
-- npm@6.8.0
-- react-devtools@3.6.1
-- react-native-cli@2.0.1

npm ERR! peer dep missing: eslint@>= 4.12.1, required by babel-eslint@10.0.1

From the output I see that something is wrong with babel-eslint plugin. So I just removed it.
npm -g uninstall babel-eslint

After removing, I was able to install packages from the system node:
nvm install v10.16.0 --reinstall-packages-from=system

Hope this will help 😉

@ljharb
Copy link
Member

ljharb commented Mar 11, 2020

k, I've added a commit that strips unmet peer deps; for resolving the other issues, i'll need further npm list -g --depth 0 output :-)

@ljharb ljharb closed this as completed in f607f2f Mar 11, 2020
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

4 participants