yarnpkg

Yarn global installs to current directory

房东的猫 提交于 2019-12-06 08:49:00
I am trying to get React Native working on my Linux machine. In order to get the cli running I have run: $ yarn global add react-native-cli and see: yarn global v0.16.1 warning No license field [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Installed react-native-cli@1.0.0 with binaries: - react-native Done in 1.70s. Everything installs just fine, but when I attempt to create a new React Native project, I get: $ react-native init Test react-native: command not found Come to find out, yarn is installing the

nvm with yarn Yarn requires Node.js 4.0 or higher to be installed

天大地大妈咪最大 提交于 2019-12-06 08:27:04
I have nvm: nvm ls v8.11.3 v8.11.4 -> v11.1.0 default -> 8.11.4 (-> v8.11.4) node -> stable (-> v11.1.0) (default) stable -> 11.1 (-> v11.1.0) (default) I installed yarn with: sudo apt-get install --no-install-recommends yarn I also added in .bashrc alias node=nodejs . But when I try yarn install I see: Yarn requires Node.js 4.0 or higher to be installed. How can I fix it? This gist helped on this problem. Run the following commands echo "==> Installing Yarn package manager" rm -rf ~/.yarn curl -o- -L https://yarnpkg.com/install.sh | bash # Yarn configurations export PATH="$HOME/.yarn/bin:

yarn is having troubles with the network connection

我的梦境 提交于 2019-12-06 03:53:21
问题 I tried to install a package with yarn earlier today and I got this yarn install yarn install v1.9.4 [1/4] 🔍 Resolving packages... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... error An unexpected error occurred: "https://registry.yarnpkg.com

tsconfig - How to ignore @types/whatever/node_modules for a specific directory?

别说谁变了你拦得住时间么 提交于 2019-12-06 03:17:38
问题 I'm running angular 1.5 with typescript (yay), and we include both @types/angular and @types/angular-mocks . The trouble is that @types/angular-mocks lists @types/angular as a dependency with * versioning. This causes yarn to install 1.6 in @types/angular-mocks/node_modules . The final result is a ts compile error: @types/angular 1.5 has a different definition for $inject than @types/angular 1.6 How can I get the tsconfig to ignore @types/angular-mocks/node_modules ? Here is my current

Simple - React and OData

杀马特。学长 韩版系。学妹 提交于 2019-12-06 01:15:37
I'm completely new to React and having a hard time understanding it. I've been tasked with creating a really simple API fetch to an OData endpoint. Now, I've come across this library https://www.npmjs.com/package/react-odata Which looks fantastic! However I just do not understand how to even get something like this working. I understand the very basic principles of how react works and have gone through many basic tutorials. But for whatever reason I can not get my head around this one. So how could I use this library to simply query an OData endpoint and display the raw data? So the issue with

AWS CodeBuild does not work with Yarn Workspaces

走远了吗. 提交于 2019-12-05 21:26:11
I'm using Yarn Workspaces in my repository and also using AWS CodeBuild to build my packages. When build starts, CodeBuild takes 60 seconds to install all packages and I'd want to avoid this time caching node_modules folder. When I add: cache: paths: - 'node_modules/**/*' to my buildspec file and enable LOCAL_CUSTOM_CACHE , I receive this error: error An unexpected error occurred: "EEXIST: file already exists, mkdir '/codebuild/output/src637134264/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/MY_REPOSITORY/node_modules/@packages/configs'". Is there a way to remove this error configuring

Rails: Precompiled assets missing node modules

依然范特西╮ 提交于 2019-12-05 21:15:37
问题 I am using yarn with my rails 5.1 app (not webpacker, just the default asset pipeline). Running a local server in development environment, I experience no issues with my assets. But as soon as I precompile my assets (the environment doesn't matter) or let Heroku package my assets, all stylesheets (of node modules) I imported from within my application.sass file don't work anymore. The reason for that behavior is that sass compiles all files into one output file, but because of some reason

Docker compose missing yarn dependencies on build

匆匆过客 提交于 2019-12-05 20:20:34
Can't get node_modules folder when running yarn install in the Dockerfile test-sof ├── docker-compose.yml ├── Dockerfile ├── package.json └── yarn.lock docker-compose.yml version: '3' services: web: build: . volumes: - .:/myapp package.json { "name": "site", "private": true, "dependencies": { "@rails/webpacker": "^3.2.1", "babel-preset-react": "^6.24.1", "prop-types": "^15.6.0", "react": "^16.2.0", "react-dom": "^16.2.0", "reactjs": "^1.0.0", "underscore": "^1.8.3" }, "devDependencies": { "webpack-dev-server": "^2.11.1" } } Dockferfile FROM ruby:2.5 RUN curl -sL https://deb.nodesource.com

Use enviroment variables in yarn package.json

﹥>﹥吖頭↗ 提交于 2019-12-05 19:47:52
I want to pull from a private package hosted on bitbucket. Since SSH is not an option for my deploy setup, I want to access the repo using the Application Password. So my entry in the package JSON looks like this: "dependencies": { "@companyName/repository": "git+https://${$BITBUCKET_USER}:${BITBUCKET_APP_PASSWORD}@bitbucket.org/company name/repository.git", Coding username and password hard into the repo URL works fine but when I perform yarn install as above, the environment variables are not replaced by its values. Is there any way to use environment variables like this? You can write a

How to get Heroku to recognize a yarn.lock or package.json within a subdirectory (not root)

此生再无相见时 提交于 2019-12-05 15:11:24
问题 I have a Rails application using React, Webpack, and Yarn for the client side. I have everything relating to the client side within the /client directory. This includes my yarn.lock and package.json files. I have a Procfile that cds into /client and properly runs yarn run build . This works locally with no errors. However, when I deploy/push to Heroku, my push is rejected and I get the following error: remote: cd client && yarn run build:production remote: sh: 1: yarn: not found remote: rake