npm install -g @tarojs/cli 无法安装



  • npm ERR! Maximum call stack size exceeded

    npm ERR! A complete log of this run can be found in:

    0 info it worked if it ends with ok
    1 verbose cli [
    1 verbose cli '/usr/local/bin/node',
    1 verbose cli '/usr/local/bin/npm',
    1 verbose cli 'install',
    1 verbose cli '-g',
    1 verbose cli '@tarojs/cli'
    1 verbose cli ]
    2 info using npm@6.14.8
    3 info using node@v14.14.0
    4 verbose npm-session 3e18812aeafc08ab
    5 silly install loadCurrentTree
    6 silly install readGlobalPackageData
    7 http fetch GET 304 https://registry.npmjs.org/@tarojs%2Fcli 972ms (from cache)
    8 silly pacote tag manifest for @tarojs/cli@latest fetched in 993ms
    9 timing stage:loadCurrentTree Completed in 4064ms
    10 silly install loadIdealTree
    11 silly install cloneCurrentTreeToIdealTree
    12 timing stage:loadIdealTree:cloneCurrentTree Completed in 37ms
    13 silly install loadShrinkwrap
    14 verbose stack at validate (/usr/local/lib/node_modules/npm/node_modules/aproba/index.js:25:19)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:37:3)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    14 verbose stack at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14)
    15 verbose cwd /Users/XXXX/js-app
    16 verbose Darwin 18.7.0
    17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "@tarojs/cli"
    18 verbose node v14.14.0
    19 verbose npm v6.14.8
    20 error Maximum call stack size exceeded
    21 verbose exit [ 1, true ]



  • 在mac系统不要用npm install -g @tarojs/lci 安装了

    直接用
    yarn global add @tarojs/cli

    这样就成功了


登录后回复