Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.2k views
in Technique[技术] by (71.8m points)

ubuntu - nodejs npm installation error in termux in proot(ubuntu20-rootfs-arm)

error:

root@localhost:~/node-v15.5.1-linux-armv7l/bin# ./npm -g i npm@next npm ERR! Cannot read property 'length' of undefined
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-01-12T20_50_46_984Z-debug.log

log:

0 verbose cli [ '/usr/bin/node', 0 verbose cli '/root/node-v15.5.1-linux-armv7l/bin/npm', 0 verbose cli 'upgrade' ] 1 info using npm@7.3.0 2 info using node@v10.19.0 3 timing config:load:defaults Completed in 11ms 4 timing config:load:file:/root/node-v15.5.1-linux-armv7l/lib/node_modules/npm/npmrc Completed in 5ms 5 timing config:load:builtin Completed in 6ms 6 timing config:load:cli Completed in 16ms 7 timing config:load:env Completed in 2ms 8 timing config:load:project Completed in 6ms 9 timing config:load:file:/root/.npmrc Completed in 1ms 10 timing config:load:user Completed in 2ms 11 timing config:load:file:/usr/etc/npmrc Completed in 1ms 12 timing config:load:global Completed in 2ms 13 timing config:load:cafile Completed in 2ms 14 timing config:load:validate Completed in 2ms 15 timing config:load:setUserAgent Completed in 3ms 16 timing config:load:setEnvs Completed in 6ms 17 timing config:load Completed in 61ms 18 verbose npm-session a38f8321a0ad798a 19 timing npm:load Completed in 124ms 20 verbose stack TypeError: Cannot read property 'length' of undefined 20 verbose stack at Object. (/root/node-v15.5.1-linux-armv7l/lib/node_modules/npm/node_modules/promise-call-limit/index.js:1:38) 20 verbose stack at Module._compile (internal/modules/cjs/loader.js:778:30) 20 verbose stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) 20 verbose stack at Module.load (internal/modules/cjs/loader.js:653:32) 20 verbose stack at tryModuleLoad (internal/modules/cjs/loader.js:593:12) 20 verbose stack at Function.Module._load (internal/modules/cjs/loader.js:585:3) 20 verbose stack at Module.require (internal/modules/cjs/loader.js:692:17) 20 verbose stack at require (internal/modules/cjs/helpers.js:25:18) 20 verbose stack at Object. (/root/node-v15.5.1-linux-armv7l/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:7:26) 20 verbose stack at Module._compile (internal/modules/cjs/loader.js:778:30) 20 verbose stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) 20 verbose stack at Module.load (internal/modules/cjs/loader.js:653:32) 20 verbose stack at tryModuleLoad (internal/modules/cjs/loader.js:593:12) 20 verbose stack at Function.Module._load (internal/modules/cjs/loader.js:585:3) 20 verbose stack at Module.require (internal/modules/cjs/loader.js:692:17) 20 verbose stack at require (internal/modules/cjs/helpers.js:25:18) 21 verbose cwd /root/node-v15.5.1-linux-armv7l/bin 22 verbose Linux 3.18.14-14381225-QB31272722 23 verbose argv "/usr/bin/node" "/root/node-v15.5.1-linux-armv7l/bin/npm" "upgrade" 24 verbose node v10.19.0 25 verbose npm v7.3.0 26 error Cannot read property 'length' of undefined 27 verbose exit 1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...