[英]NextJs setup in vscode using Yarn
I ran yarn create next-app --typescript
to create a TypeScript Next app using Yarn.我运行
yarn create next-app --typescript
以使用 Yarn 创建一个 TypeScript Next 应用程序。 The app runs fine using yarn run dev
;该应用程序使用
yarn run dev
运行良好; however, vscode does not read any of the yarn packages added.但是,vscode 不会读取任何添加的纱线包。
I've tried following the instructions on the official Yarn's Editor SDKs article by running:
我尝试按照官方Yarn 的编辑器 SDK文章中的说明运行:
yarn dlx @yarnpkg/sdks vscode
Same issue but i found solution https://stackoverflow.com/a/73001522/2991626同样的问题,但我找到了解决方案https://stackoverflow.com/a/73001522/2991626
just create .yarnrc.yml
and add 1 line content nodeLinker: node-modules
then just type command yarn
and vscode will works with yarn只需创建
.yarnrc.yml
并添加 1 行内容nodeLinker: node-modules
然后只需键入命令yarn
,vscode 将与 yarn 一起使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.