Closed allaniftrue closed 4 years ago
After a 4 hours
It might also be worth reporting this as an issue with canvas
.
https://github.com/Automattic/node-canvas/issues
Yarn is just waiting for the install scripts supplied by canvas
to finish running.
I, too, am experiencing this issue. It happens when deploying my Rails 6 app to an Ubuntu 18.04 server using Capistrano. The issue is experienced both when Capistrano runs 'yarn install' and when I manually run 'yarn install' on the remote server (Ubuntu).
Ubuntu 18.04 on VMWARE | 8 CPU | 16GB RAM | 20GB HD
Running Yarn v1.21.1
{ "name": "MyApp", "private": true, "dependencies": { "@rails/actioncable": "^6.0.0", "@rails/activestorage": "^6.0.0", "@rails/ujs": "^6.0.0", "@rails/webpacker": "4.2.2", "bootstrap": "^4.4.1", "jquery": "^3.4.1", "popper.js": "^1.16.0", "stimulus": "^1.1.1", "turbolinks": "^5.2.0", "node-sass": "^4.13.0" }, "version": "0.1.0", "devDependencies": { "@fortawesome/fontawesome-free": "^5.12.0", "webpack": "4.41.5", "webpack-dev-server": "^3.9.0" } }
The Capistrano deploy process hangs at 'yarn install'
03:45 deploy:assets:precompile 01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile 01 yarn install v1.21.1 01 [1/4] Resolving packages... 01 [2/4] Fetching packages... 01 warning sha.js@2.4.11: Invalid bin entry for "sha.js" (in "sha.js"). 01 info fsevents@1.2.11: The platform "linux" is incompatible with this module. 01 info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation. 01 [3/4] Linking dependencies... 01 [4/4] Building fresh packages...
Not sure what the issue was. I tried to build using a different machine, everything works again. :(
So do I. Never end......
node: v10.18.1 npm: 6.13.4 yarn: 1.22.0
package.json:
{
"name": "@xure/bricks",
"version": "1.1.16",
"main": "./dist/bricks-plugin.umd.min.js",
"types": "./dist/types/index.d.ts",
"scripts": {
"serve": "vue-cli-service serve",
"lint": "vue-cli-service lint",
"dev": "vue-cli-service build --target lib --name bricks-plugin src/index.ts --watch --mode=production",
"build": "vue-cli-service build --target lib --name bricks-plugin src/index.ts"
},
"peerDependencies": {
"vue": "^2.6.10"
},
"dependencies": {
"vue-class-component": "^7.1.0",
"vue-property-decorator": "^8.2.1"
},
"devDependencies": {
"@byted/tslint-rules": "^1.0.4",
"@types/swiper": "^4.4.3",
"@types/zepto": "^1.0.30",
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-typescript": "^3.8.1",
"@vue/cli-service": "^3.8.4",
"babel-core": "7.0.0-bridge.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"swiper": "^4.5.0",
"typescript": "^3.5.2",
"vue-template-compiler": "^2.6.10"
},
"license": "MIT",
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"readme": "ERROR: No README data found!"
}
I just want to install md5
,run:
yarn add md5 --save-dev
I got this.......
I reproduced the bug with the following Dockerfile :
docker --version
-> Docker version 19.03.8, build afacb8b7f0
FROM node:10.20.1
RUN yarn init --yes
RUN yarn add canvas
docker build --no-cache .
Done in 1140.50s.
(~20min)
The versions in the docker :
docker run node:10.20.1 node --version
-> v10.20.1
docker run node:10.20.1 yarn --version
-> 1.22.4
I tried with npm and as far as I can tell the build didn't finish at all
I'd like to reiterate that I don't think this is a yarn issue. Yarn is just going to call canvas
's install script and wait for it to exit.
I can't repro it myself, even with the Dockerfile
provided by @Babeetlebum it only takes 12s
$ docker build .
Sending build context to Docker daemon 24.37MB
Step 1/3 : FROM node:10.20.1
10.20.1: Pulling from library/node
1c6172af85ee: Pull complete
b194b0e3c928: Pull complete
1f5ec00f35d5: Pull complete
93b1353672b6: Pull complete
3d7f38db3cca: Pull complete
21e102f9fe89: Pull complete
1f9c0020f4f4: Pull complete
5ab83c758454: Pull complete
654868f0dc71: Pull complete
Digest: sha256:0e2671bc0702132989b2b5142617d47c421bd304acd924fbff812370f6107db2
Status: Downloaded newer image for node:10.20.1
---> c5f1efe092a0
Step 2/3 : RUN yarn init --yes
---> Running in 38bb5ac97aab
yarn init v1.22.4
warning The yes flag has been set. This will automatically answer yes to all questions, which may have security implications.
success Saved package.json
Done in 0.07s.
Removing intermediate container 38bb5ac97aab
---> 417cb343e9f9
Step 3/3 : RUN yarn add canvas
---> Running in 1b04748b6d58
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 68 new dependencies.
info Direct dependencies
└─ canvas@2.6.1
info All dependencies
├─ abbrev@1.1.1
...etc...
└─ yallist@3.1.1
Done in 12.36s.
Removing intermediate container 1b04748b6d58
---> 42420ca4ea8e
Successfully built 42420ca4ea8e
For those than can repro the slowness, my recommendation for trying to find what is causing it would be to run the yarn install and skipping install scripts with the --ignore-scripts
parameter, then manually run the canvas
install script
yarn install --ignore-scripts
cd node_modules/canvas/
yarn run node-pre-gyp install --fallback-to-build
This should let you see the console output for the node-pre-gyp
command and give you a better sense of what it is doing.
I'm going to close this issue for now because there is nothing yarn can do to make canvas' install and compilation of C code faster, but if anyone finds that it is a direct yarn problem then we can certainly reopen this.
the same issue here, timestamp Mar 09 2023.
the same issue here, timestamp Mar 09 2023.
yarn version 1.22.19
Still waiting 🥲
The never-ending build of packages. Using yarn version v1.21.1 && node v8.12.0 (npm v6.4.1).
I have tried
packages inherited from other devs