yarnpkg

How do I omit a package from being included in my yarn.lock file?

故事扮演 提交于 2021-02-05 09:12:47
问题 So in my package.json I have a bunch of npm libs, and one private repo being pulled in from a git ssh url which needs to always be the latest build. The yarn.lock adds the git sha and yarn upgrade etc won't grab the newest one. Basically, given this: "dependencies": { "some-package" : "^0.x.x", "some-other-package" : "*", "my-private-git-repo" : "git+ssh://git@bitbucket.org/me/myrepo.git", "lastlibrary" : "^4.0.3" }, I want yarn.lock or npm shrinkwrap to ignore my-private-git-repo Is this

Install packages with Yarn on Elastic Beanstalk

纵然是瞬间 提交于 2021-02-05 05:22:22
问题 I'd like to install packages on Elastic Beanstalk using Yarn as an alternative to NPM. I've tried all sorts of solutions I've found online, but they all appear to be outdated and no longer work. Here's what I have right now, as described in this gist. files: '/opt/elasticbeanstalk/hooks/appdeploy/pre/49yarn.sh' : mode: '000755' owner: root group: root content: | #!/usr/bin/env bash set -euxo pipefail EB_APP_STAGING_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_staging_dir) if

Install packages with Yarn on Elastic Beanstalk

梦想与她 提交于 2021-02-05 05:22:03
问题 I'd like to install packages on Elastic Beanstalk using Yarn as an alternative to NPM. I've tried all sorts of solutions I've found online, but they all appear to be outdated and no longer work. Here's what I have right now, as described in this gist. files: '/opt/elasticbeanstalk/hooks/appdeploy/pre/49yarn.sh' : mode: '000755' owner: root group: root content: | #!/usr/bin/env bash set -euxo pipefail EB_APP_STAGING_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_staging_dir) if

Yarn workspaces: nohoist exclude

烈酒焚心 提交于 2021-01-29 20:29:11
问题 In my package.json, I currently have "workspaces": { "nohoist": ** } I would like to specify JUST TWO packages to hoist, and nohoist on everything else. Is there a simple way to do this without pasting all of my packages except those two into nohoist ? 回答1: After days of digging I ended up with the following configuration. Yarn seems to use some kind of Bash glob pattern matching (see this Linux journal article for a tutorial). In this configuration the "nohoist" rule disables hoisting for

Select2 Css is not loading via yarn or assets precompile

坚强是说给别人听的谎言 提交于 2021-01-29 18:01:29
问题 I am running into a strange issue where everything is working as expected except select2. I am having Rails 6.0.0 app and installed select2 via yarn add select2 . Then i added it to application.js file. File looks like below. #app/javascripts/packs/application.js require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() require("channels") require('datatables.net') require('datatables.net-dt') require('datatables.net-bs4') require('select2') import

How to offline my Node dependencies to deploy to Artifactory?

匆匆过客 提交于 2021-01-29 14:23:29
问题 I have an Artifactory server that is not connected to the internet and can't be. I have a React project that I need to be able to build using said Artifactory server. How can I download/pack/tar all of my project dependencies and deploy them to Artifactory? 回答1: you must have an internet connection to retrieve the node modules dependencies. once done, you can list all packages and their resolved url find node_modules \ -type f \ -name package.json \ -exec jq -r '._resolved' {} \; \ | sort \ |

Node version will not update using n

岁酱吖の 提交于 2021-01-29 08:57:51
问题 To give some context, I set up my machine using this Medium post, Don’t Use sudo with npm …still. I installed Node using brew about a year and a half ago, which installed v12.18.1. I also installed n at the time using brew , but never had to change versions until now. My .zshrc file includes the following: # For globally installed npm packages (without using sudo) export PATH="$HOME/.npm/bin:$PATH" # Path to n (managing node versions) export N_PREFIX="$HOME/.n" export PATH="$PATH:$N_PREFIX

Issue reinstalling yarn - code: 'MODULE_NOT_FOUND'

天大地大妈咪最大 提交于 2021-01-29 08:20:41
问题 Node.js Version :14.0.0 OS : MacOS 10.15.4 Scope (install, code, runtime, meta, other?) : Yarn install Module (and version) (if relevant) : internal/modules/cjs/loader.js Upon running any Yarn command, I get the following error. This is after reinstalling and following this sequence of commands: YARN UNINSTALL: yarn cache clean open terminal rm -rf node_modules yarn.lock yarn-error.log package-lock.json brew uninstall --force yarn npm uninstall -g yarn yarn -v which yarn rm -rf ~/.yarn

Create-React-App Unexpected Connection Refused

梦想的初衷 提交于 2021-01-28 14:21:12
问题 I keep getting the below error when I try to simply create a new react app. I even set up fiddler on my computer and set my proxy to work with that but I am still getting the following error: ECONNREFUSED 13.107.6.183:443 Click here for the complete log $ create-react-app testmeup Creating a new React app in C:\***\source\Dev\testmeup. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts... yarn add v1.15.2 [1/4] Resolving packages... error

Create-React-App Unexpected Connection Refused

感情迁移 提交于 2021-01-28 14:15:58
问题 I keep getting the below error when I try to simply create a new react app. I even set up fiddler on my computer and set my proxy to work with that but I am still getting the following error: ECONNREFUSED 13.107.6.183:443 Click here for the complete log $ create-react-app testmeup Creating a new React app in C:\***\source\Dev\testmeup. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts... yarn add v1.15.2 [1/4] Resolving packages... error