Closed milk713785 closed 2 years ago
PS F:\VSCodeFolder\install\less.js-master> npm -v 7.24.0
PS F:\VSCodeFolder\install\less.js-master> npm install -g less npm ERR! invalid options argument
0 verbose cli [ 0 verbose cli 'F:\Program Files\nodejs\node.exe', 0 verbose cli 'F:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 0 verbose cli 'install', 0 verbose cli 'less' 0 verbose cli ] 1 info using npm@7.24.0 2 info using node@v16.10.0 3 timing npm:load:whichnode Completed in 1ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:F:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms 6 timing config:load:builtin Completed in 2ms 7 timing config:load:cli Completed in 2ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:F:\VSCodeFolder\project.npmrc Completed in 1ms 10 timing config:load:project Completed in 2ms 11 timing config:load:file:.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:\AppData\Roaming\npm\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:credentials Completed in 1ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 10ms 19 timing npm:load:configload Completed in 10ms 20 timing npm:load:setTitle Completed in 0ms 21 timing npm:load:setupLog Completed in 1ms 22 timing config:load:flatten Completed in 8ms 23 timing npm:load:cleanupLog Completed in 3ms 24 timing npm:load:configScope Completed in 0ms 25 timing npm:load:projectScope Completed in 0ms 26 timing npm:load Completed in 24ms 27 timing arborist:ctor Completed in 1ms 28 timing arborist:ctor Completed in 0ms 29 timing idealTree:init Completed in 14ms 30 timing idealTree:userRequests Completed in 1ms 31 silly idealTree buildDeps 32 silly fetch manifest less@* 33 verbose stack TypeError: invalid options argument 33 verbose stack at optsArg (F:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\lib\opts-arg.js:13:11) 33 verbose stack at mkdirp (F:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:11:10) 33 verbose stack at tryCatcher (F:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23) 33 verbose stack at ret (eval at makeNodePromisifiedEval (F:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promisify.js:184:12), :13:39) 33 verbose stack at Object.mkdirfix (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\util\fix-owner.js:36:10) 33 verbose stack at makeTmp (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\content\write.js:121:19) 33 verbose stack at write (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\content\write.js:35:19) 33 verbose stack at putData (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\put.js:11:10) 33 verbose stack at Object.x.put (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\locales\en.js:28:37) 33 verbose stack at WriteStream._flush (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\make-fetch-happen\cache.js:156:21) 33 verbose stack at WriteStream._write (F:\Program Files\nodejs\node_modules\npm\node_modules\flush-write-stream\index.js:36:35) 33 verbose stack at doWrite (F:\Program Files\nodejs\node_modules\npm\node_modules\readable-stream\lib_stream_writable.js:409:139) 33 verbose stack at writeOrBuffer (F:\Program Files\nodejs\node_modules\npm\node_modules\readable-stream\lib_stream_writable.js:398:5) 33 verbose stack at WriteStream.Writable.write (F:\Program Files\nodejs\node_modules\npm\node_modules\readable-stream\lib_stream_writable.js:307:11) 33 verbose stack at WriteStream.end (F:\Program Files\nodejs\node_modules\npm\node_modules\flush-write-stream\index.js:45:41) 33 verbose stack at WriteStream.end (F:\Program Files\nodejs\node_modules\npm\node_modules\flush-write-stream\index.js:42:47) 34 verbose cwd F:\VSCodeFolder\project 35 verbose Windows_NT 10.0.19042 36 verbose argv "F:\Program Files\nodejs\node.exe" "F:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "less" 37 verbose node v16.10.0 38 verbose npm v7.24.0 39 error invalid options argument 40 verbose exit 1
There is no mention on the homepage of how to install less without using npm.
The problem has been resolved by reinstalling nodejs to the default location.
PS F:\VSCodeFolder\install\less.js-master> npm -v 7.24.0
PS F:\VSCodeFolder\install\less.js-master> npm install -g less npm ERR! invalid options argument
npm ERR! A complete log of this run can be found in: npm ERR! \npm-cache_logs\2021-09-30T06_26_22_032Z-debug.log
================================= 2021-09-30T06_26_22_032Z-debug.log:
0 verbose cli [ 0 verbose cli 'F:\Program Files\nodejs\node.exe', 0 verbose cli 'F:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 0 verbose cli 'install', 0 verbose cli 'less' 0 verbose cli ] 1 info using npm@7.24.0 2 info using node@v16.10.0 3 timing npm:load:whichnode Completed in 1ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:F:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms 6 timing config:load:builtin Completed in 2ms 7 timing config:load:cli Completed in 2ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:F:\VSCodeFolder\project.npmrc Completed in 1ms 10 timing config:load:project Completed in 2ms 11 timing config:load:file:.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:\AppData\Roaming\npm\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:credentials Completed in 1ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 10ms 19 timing npm:load:configload Completed in 10ms 20 timing npm:load:setTitle Completed in 0ms 21 timing npm:load:setupLog Completed in 1ms 22 timing config:load:flatten Completed in 8ms 23 timing npm:load:cleanupLog Completed in 3ms 24 timing npm:load:configScope Completed in 0ms 25 timing npm:load:projectScope Completed in 0ms 26 timing npm:load Completed in 24ms 27 timing arborist:ctor Completed in 1ms 28 timing arborist:ctor Completed in 0ms 29 timing idealTree:init Completed in 14ms 30 timing idealTree:userRequests Completed in 1ms 31 silly idealTree buildDeps 32 silly fetch manifest less@* 33 verbose stack TypeError: invalid options argument 33 verbose stack at optsArg (F:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\lib\opts-arg.js:13:11) 33 verbose stack at mkdirp (F:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:11:10) 33 verbose stack at tryCatcher (F:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23) 33 verbose stack at ret (eval at makeNodePromisifiedEval (F:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promisify.js:184:12),:13:39)
33 verbose stack at Object.mkdirfix (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\util\fix-owner.js:36:10)
33 verbose stack at makeTmp (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\content\write.js:121:19)
33 verbose stack at write (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\content\write.js:35:19)
33 verbose stack at putData (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\put.js:11:10)
33 verbose stack at Object.x.put (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\locales\en.js:28:37)
33 verbose stack at WriteStream._flush (F:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\node_modules\make-fetch-happen\cache.js:156:21)
33 verbose stack at WriteStream._write (F:\Program Files\nodejs\node_modules\npm\node_modules\flush-write-stream\index.js:36:35)
33 verbose stack at doWrite (F:\Program Files\nodejs\node_modules\npm\node_modules\readable-stream\lib_stream_writable.js:409:139)
33 verbose stack at writeOrBuffer (F:\Program Files\nodejs\node_modules\npm\node_modules\readable-stream\lib_stream_writable.js:398:5)
33 verbose stack at WriteStream.Writable.write (F:\Program Files\nodejs\node_modules\npm\node_modules\readable-stream\lib_stream_writable.js:307:11)
33 verbose stack at WriteStream.end (F:\Program Files\nodejs\node_modules\npm\node_modules\flush-write-stream\index.js:45:41)
33 verbose stack at WriteStream.end (F:\Program Files\nodejs\node_modules\npm\node_modules\flush-write-stream\index.js:42:47)
34 verbose cwd F:\VSCodeFolder\project
35 verbose Windows_NT 10.0.19042
36 verbose argv "F:\Program Files\nodejs\node.exe" "F:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "less"
37 verbose node v16.10.0
38 verbose npm v7.24.0
39 error invalid options argument
40 verbose exit 1