yarn install 报错

Saber 未结 1 39
153934475
153934475 剑圣 2024-09-15 15:14

一、该问题的重现步骤是什么?

PS D:\WebstormProjects\Saber3> yarn install    

yarn install v1.22.22

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

[1/4] Resolving packages...

[2/4] Fetching packages...

error TypeError [ERR_INVALID_CHAR]: https://center.javablade.com/api/packages/blade/npm/%40saber%2Fnf-design-base-elp/-/1.2.0/nf-design-base-elp-1.2.0.tgz: Invalid character in header content ["authorization"]



二、你期待的结果是什么?实际看到的又是什么?


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

4.1.0

四、请提供详细的错误堆栈信息,这很重要。

PS D:\WebstormProjects\Saber3> yarn install    

yarn install v1.22.22

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

[1/4] Resolving packages...

[2/4] Fetching packages...

error TypeError [ERR_INVALID_CHAR]: https://center.javablade.com/api/packages/blade/npm/%40saber%2Fnf-design-base-elp/-/1.2.0/nf-design-base-elp-1.2.0.tgz: Invalid character in header content ["authorization"]

    at ClientRequest.setHeader (node:_http_outgoing:651:3)

    at new ClientRequest (node:_http_client:291:14)

    at Object.request (node:https:358:10)

    at module.exports.Request.start (C:\Users\li\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:141972:32)

    at module.exports.Request.end (C:\Users\li\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:142731:10)

    at end (C:\Users\li\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:141785:14)

    at Immediate.<anonymous> (C:\Users\li\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:141799:7)

    at process.processImmediate (node:internal/timers:476:21)

info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

五、若有更多详细信息,请在下面提供。

1条回答
  • package-lock.json.这个文件删了,看下文档的这个章节配置一下前端的令牌重新install一下:https://center.javablade.com/blade/BladeX-Doc/src/branch/master/%E7%AC%AC1%E7%AB%A0%20%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B/1.3%20%E5%B7%A5%E7%A8%8B%E5%AF%BC%E5%85%A5/1.3.0%20%E9%85%8D%E7%BD%AE%E8%B5%84%E6%BA%90%E4%BB%A4%E7%89%8C.md

    1726385049985.jpg

    作者追问:2024-09-15 22:55

    yarn install 报错:

    D:\WebstormProjects\Saber3>yarn config set registry https://registry.npm.taobao.org -g

    yarn config v1.22.22

    success Set "registry" to "https://registry.npm.taobao.org".

    Done in 0.07s.


    D:\WebstormProjects\Saber3>yarn install

    yarn install v1.22.22

    [1/4] Resolving packages...

    error Error: certificate has expired

        at TLSSocket.onConnectSecure (node:_tls_wrap:1600:34)

        at TLSSocket.emit (node:events:517:28)

        at TLSSocket._finishInit (node:_tls_wrap:1017:8)

        at ssl.onhandshakedone (node:_tls_wrap:803:12)

    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


    0 讨论(0)
提交回复