yarnpkg

“error TS2694: Namespace 'angular' has no exported member 'xxx'” after upgrading @types/angular

隐身守侯 提交于 2020-01-21 07:26:09
问题 After upgrading angular and @types/angular version to version 1.6.x I have lots of TS2694 errors: error TS2694: Namespace 'angular' has no exported member 'material' error TS2694: Namespace 'angular' has no exported member 'ui' error TS2694: Namespace 'angular' has no exported member 'translate' This worked fine before changing the version number. What could cause the issue? 回答1: The problem was related to several angular type definitions in my node_modules. Angular types were defined in node

“error TS2694: Namespace 'angular' has no exported member 'xxx'” after upgrading @types/angular

爷,独闯天下 提交于 2020-01-21 07:25:44
问题 After upgrading angular and @types/angular version to version 1.6.x I have lots of TS2694 errors: error TS2694: Namespace 'angular' has no exported member 'material' error TS2694: Namespace 'angular' has no exported member 'ui' error TS2694: Namespace 'angular' has no exported member 'translate' This worked fine before changing the version number. What could cause the issue? 回答1: The problem was related to several angular type definitions in my node_modules. Angular types were defined in node

What does Yarn (really) mean by “warning Pattern [”debug@^4.1.1“] is trying to unpack in the same destination”

你。 提交于 2020-01-16 18:08:07
问题 I see there are other questions regarding this warning from Yarn on Stack Overflow, but I can't find the answer to what it means -- I mean, what it really means. That is, what does it mean for me and my app, and how can I correct it? I'm trying to add debug with Yarn, i.e. yarn add debug -D and I get the warning warning Pattern ["debug@^4.1.1"] is trying to unpack in the same destination "/Users/xyz/Library/Caches/Yarn/v4/npm-debug-4.1.1-3b72260255109c6b589cee050f1d516139664791/node_modules

yarn install error:Failed to download Chromium

巧了我就是萌 提交于 2020-01-14 18:51:11
问题 The Yarn install failed to download Chromium. Error is as follows: D:\workspace\www\ant-design-mobile-pro λ yarn yarn install v1.12.3 //... Directory: D:\\workspace\\www\\ant-design-mobile-pro\\node_modules\\puppeteer Output: ERROR: Failed to download Chromium r599821! Set \"PUPPETEER_SKIP_CHROMIUM_DOWNLOAD\" env variable to skip download. { Error: connect ETIMEDOUT 172.217.161.176:443 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14) errno: 'ETIMEDOUT', code: 'ETIMEDOUT',

yarn test: all tests passed but returned “error Command failed with exit code 1”

限于喜欢 提交于 2020-01-14 13:14:10
问题 I used to use npm but recently switched to yarn. When I run yarn test it shows all tests passed but below says error Command failed with exit code 1 with no other information on what could have caused this error node version: 6.3.1 yarn version: 0.16.3 potential cause console.error node_modules/core-js/modules/es6.promise.js:117 Unhandled promise rejection Error: Actions may not be an undefined. at dispatch (/node_modules/redux-mock-store/lib/index.js:35:19) at /node_modules/redux-thunk/lib

How can I version bump all my dependencies?

戏子无情 提交于 2020-01-13 05:10:07
问题 Having yarn outdated is quite informative but I'd like to avoid running over package by package doing yarn upgrade . From yarn's documentation, just yarn upgrade without arguments is said to upgrade all dependencies but there's no change in my project's package.json and yarn outdated shows the same packages versions than before. Is there some command or argument that just bumps all my dependencies? If not, is the practice discouraged in some way? 回答1: You can update your packages to the

How to get yarn install --offline with node-sass working?

旧街凉风 提交于 2020-01-13 02:16:52
问题 I am trying to use yarn in offline mode because the build server I am using does not have access to yarn registry or github.com . I found this article on how to use yarn in offline mode which works great until I added node-sass. It appears even if you use yarn install --offline , node-sass will go to github.com to download libsass . Is there a way to instruct node-sass to use an offline version of libsass instead of going to github.com ? 回答1: As @jonrsharpe pointed out, you need to use either

Yarn - There appears to be trouble with your network connection. Retrying

北慕城南 提交于 2020-01-12 04:30:27
问题 I have been trying to do the quickstart guide for react native, but kept getting this error There appears to be trouble with your network connection. Retrying... My connection works just fine. 回答1: This happens when your network is too slow or the package being installed is too large, and Yarn just assumes it's a network problem. Try increasing Yarn network timeout: yarn add <yourPackage> --network-timeout 100000 回答2: I got this issue because I was working within my company internal network

How to clear cache in Yarn?

爷,独闯天下 提交于 2020-01-11 15:11:01
问题 I am doing some benchmark tests for Facebook's Yarn. For this, I need to clear my global Yarn cache. Is there a command available for this? I have force-removed my ~/.yarn-cache folder, but this seems to be quite manual. 回答1: Ok I found out the answer myself. Much like npm cache clean , Yarn also has its own yarn cache clean 回答2: Just run yarn cache clean . Run yarn help cache in your bash, and you will see: Usage: yarn cache [ls|clean] [flags] Options: -h, --help output usage information -V,

How to clear cache in Yarn?

别等时光非礼了梦想. 提交于 2020-01-11 15:10:19
问题 I am doing some benchmark tests for Facebook's Yarn. For this, I need to clear my global Yarn cache. Is there a command available for this? I have force-removed my ~/.yarn-cache folder, but this seems to be quite manual. 回答1: Ok I found out the answer myself. Much like npm cache clean , Yarn also has its own yarn cache clean 回答2: Just run yarn cache clean . Run yarn help cache in your bash, and you will see: Usage: yarn cache [ls|clean] [flags] Options: -h, --help output usage information -V,