Yarn: ENOSPC: no space left on device, write error on Gitlab CI/CD Pipeline

Created on 9 Jan 2019  路  5Comments  路  Source: yarnpkg/yarn

issue

When making updates to VuePress and running the CI / CD Pipeline job in Gitlab I get the following error. It's not clear to me what is causing this issue, any help would be appreciated. I thought i may be relating to the DB package "caniuse-db": "^1.0.30000925" so I added that to my dependencies in package.json, with yarn add caniuse-db but I'm still getting the same error.

expected results

pipeline job completes and passes without failures.

error message

$ yarn install
yarn install v1.5.1
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000847.tgz: ENOSPC: no space left on device, write".
info If you think this is a bug, please open a bug report with the information provided in "/builds/xxxx/docs/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR: Job failed: exit code 1

package.json file

{
"name": "vuepress-gl-pages",
"version": "1.0.0",
"description": "A starter project for hosting VuePress sites on GitLab pages.",
"main": "index.js",
"author": "samdbeckham",
"license": "MIT",
"private": false,
"scripts": {
"start": "vuepress dev docs",
"build": "vuepress build docs"
},
"dependencies": {
"@vuepress/plugin-active-header-links": "^1.0.0-alpha.0",
"@vuepress/plugin-search": "^1.0.0-alpha.0",
"@vuepress/theme-default": "^1.0.0-alpha.0",
"caniuse-db": "^1.0.30000925",
"docsearch.js": "^2.6.2",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2"
},
"devDependencies": {
"vuepress": "^0.14.8"
}
}

OS

Mac Mojave 10.14.2

triaged

Most helpful comment

The thing is, this error isn't about Yarn or Vuepress, but rather your Gitlab settings. The machine used by Gitlab simply doesn't have enough space to install all your dependencies. Do you have a lot of them?

To get an estimate of the cache size needed (your command fails during the fetch step, so that's even before the node_modules get built):

$> yarn cache clean && yarn && du -d1 -h $(yarn cache dir)

If you can't remove dependencies, I'd suggest to contact the Gitlab support, maybe they'd know more (maybe you need a paying plan to get more space).

All 5 comments

Hello, any updates on this issue?

ENOSPC: no space left on device

I mean, that sounds clear ... you don't have space left on your disk.

@arcanis Thanks, and I understand that is the issue but its not clear to me how to resolve it. is there a disk size configuration I need to set in one of the packages like caniuse-db so the build isn't throwing an error on gitlab? or can I set it so this error is just ignored? the failure occurs when the code is merged into Gitlab, and when I deploy locally and to AWS it works fine. -- Sorry if this is a novice question but I'm pretty new to using Vuepress + Yarn, Thanks again for the assistance.

The thing is, this error isn't about Yarn or Vuepress, but rather your Gitlab settings. The machine used by Gitlab simply doesn't have enough space to install all your dependencies. Do you have a lot of them?

To get an estimate of the cache size needed (your command fails during the fetch step, so that's even before the node_modules get built):

$> yarn cache clean && yarn && du -d1 -h $(yarn cache dir)

If you can't remove dependencies, I'd suggest to contact the Gitlab support, maybe they'd know more (maybe you need a paying plan to get more space).

@arcanis super helpful! I'll look into it.

Was this page helpful?
0 / 5 - 0 ratings