当我尝试在本地安装 vue store front 但当我尝试“yarn install”命令时,出现以下错误。我该如何解决这个错误?我该如何解决这个错误?
error /var/www/html/vue-storefront/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /var/www/html/vue-storefront/node_modules/node-sass
Output:
Building: /usr/bin/node /var/www/html/vue-storefront/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/usr/bin/node',
gyp verb cli '/var/www/html/vue-storefront/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info …Run Code Online (Sandbox Code Playgroud) 我正在试验纱线工作区 monorepo。它由一个用 创建的 TestProjectcreate-react-app和一个用创建的 SharedLib1 组成create-react-library。TestProject 从 SharedLib1 导入代码。问题是,TestProject 使用依赖于 babel-jest ^24.9.0 的 react-scripts 3.3.0,而 SharedLib1 使用依赖于 babel-jest 22.4.4 的 react-scripts-ts ^2.16.0。yarn start在 TestProject 中运行时,它抱怨:
The react-scripts package provided by Create React App requires a dependency:
"babel-jest": "^24.9.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-jest was detected higher up in the tree:
/monoRepo/node_modules/babel-jest (version: 22.4.4)
Run Code Online (Sandbox Code Playgroud)
我可以通过SKIP_PREFLIGHT_CHECK=true在 TestProject 中设置或手动升级 SharedLib1 中的 react-scripts来禁用错误,但我想知道是否有更好的方法来处理这个问题。 …
我想在我的 Windows 中运行一个 React 项目(作为我的 Mac 的虚拟机)。
在命令提示符下,运行后yarn安装依赖项。我做到了yarn start。它给了我'HTTPS' is not recognized as an internal or external command错误。
> yarn start
yarn run v1.13.0
$ HTTPS=true CERT=cert/localhost.crt KEY=cert/localhost.key umi dev
'HTTPS' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Run Code Online (Sandbox Code Playgroud)
有谁知道如何解决这一问题?
编辑1:
我将节点升级到v12.16.1(yarn到1.13.0,npm 到6.13.4),并执行了yarn …
我有一个纱线工作区,其中设置了文件夹public和server. 我在 VS Code 中使用 TypeScript。在任何没有随包预安装类型的模块上,我在 VS Code 中收到错误:
Cannot find module 'x'
Run Code Online (Sandbox Code Playgroud)
但是,IntelliSense 将显示x为建议。我两个都有x,@types/x如果我安装的话似乎没有什么区别@types/x。谢谢
Windows 1909 (Latest)
Visual Studio Code 1.43 (Latest)
TypeScript ^3.8.3 (Latest)
Yarn 2.0.0-rc.30 (Latest)
Run Code Online (Sandbox Code Playgroud)
另外,我试图找到纱线的类型根,但没有。有人可以告诉我类型根目录在哪里吗?
关于零安装,Yarn 2文档说:
虽然“零安装”一词本身并不是一项功能,但它包含了许多围绕一个特定目标定制的 Yarn 功能 - 通过从等式中消除主要的熵源:Yarn 本身,使您的项目尽可能稳定和快速。[...]
我读了整个故事,但并没有真正完全理解。
Yarn 2 零安装和 Yarn 2 正常安装有什么区别?
我正在为客户将一个大型的 monorepo 转换为 TypeScript,但是,我自己对 TS 还很陌生,并且遇到了一个错误,我找不到明显的修复方法。
TS6059: File '[path to repo root]/packages/config/globals.ts' is not under 'rootDir' '[path to repo root]/packages/components/src'. 'rootDir' is expected to contain all source files.
该globals.ts文件不应该存在于components包中,它属于config包,所以我不太明白这个错误。
我在存储库的根目录中有一个主 tsconfig 文件(https://github.com/serge-web/serge/blob/feature/333-game-admin-channel/tsconfig.json),然后每个包都有自己的tsconfig 文件扩展了该文件。该components包的位置在这里: https: //github.com/serge-web/serge/blob/feature/333-game-admin-channel/packages/components/tsconfig.json
我假设我错误地扩展了包中的 tsconfig 文件,或者我references错误地使用了它,但我找不到正确的方法来执行此操作。
如果您需要查看结构,这里是存储库的链接:https://github.com/serge-web/serge/tree/feature/333-game-admin-channel
我.npmrc在我的项目的根目录中有一个私有的 npm 注册表和一个文件,如下所示
_auth=${NPM_TOKEN}
always-auth=true
email=example@gmail.com
registry=https://example.com/artifactory/api/npm/
Run Code Online (Sandbox Code Playgroud)
但我yarn install用来安装软件包。现在,我很困惑。
我应该创建一个.yarnrc文件吗?如果是这样,我如何将.npmrc上面的转换为.yarnrc?在https://classic.yarnpkg.com/en/docs/yarnrc/ 中没有找到诸如_auth, 之类的配置always-auth
yarn安装软件包,从https://registry.yarnpkg.com,npm从安装软件包https://registry.npmjs.org/。他们有不同的注册表。我不确定yarn可以从我的私有 npm 注册表安装软件包并遵守.npmrc.
我将使用yarn. 我应该建立一个私人纱线注册表吗?
我第一次测试 VSCode,并按照建议在 settings.json 中配置代理:
"http.proxy": " http://domain\user:pass@myproxy:port/ "
但当我尝试安装新扩展时,它不起作用,出现连接超时错误。我还尝试将代理配置为系统环境变量,结果相同。你可以帮帮我吗?这是一个错误还是我做错了什么?还有其他方法可以下载扩展吗?
非常感谢!
我尝试创建新项目,但发生了这种情况,我按照他们所说的那样更新了核心How to update core-js to core-js@3 dependency? 但也没有任何帮助我使用 Windows 10,我该怎么办?
c:\Users\alothman\Desktop>npx react-native init travelApp
This will walk you through creating a new React Native project in c:\Users\alothman\Desktop\travelApp
Using yarn v1.21.1
Installing react-native...
yarn add v1.21.1
info No lockfile found.
[1/4] Resolving packages...
warning react-native > fbjs > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > create-react-class > …Run Code Online (Sandbox Code Playgroud) yarnpkg ×9
node.js ×4
reactjs ×3
javascript ×2
monorepo ×2
npm ×2
typescript ×2
lerna ×1
proxy ×1
react-admin ×1
react-native ×1
umijs ×1
vue.js ×1
windows-10 ×1