Running YARN START results in a "no available space on device" error

Operating System: UBUNTU 18.04

After creating a basic create-react-app project, I initiated the server using yarn start. Surprisingly, it works smoothly 30% of the time, but encounters an error in 70% of cases as described below.

Starting the development server...

events.js:167
    throw er; // Unhandled 'error' event
    ^

Error: ENOSPC: no space left on device, watch '/media/prameshbajra/pramesh/Code/learning-react-redux/shopping-cart/public'
    at FSWatcher.start (internal/fs/watchers.js:164:26)
    at Object.watch (fs.js:1232:11)
    at createFsWatchInstance (/media/prameshbajra/pramesh/Code/learning-react-redux/shopping-cart/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/media/prameshbajra/pramesh/Code/learning-react-redux/shopping-cart/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    .... more stack trace lines ...
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The cause of this error is puzzling to me. Despite having ample free space on my laptop – approximately 90% of the hard disk – and attempting to run the project from various locations and drives, including using npm start, the issue persists without a clear solution.

Answer №1

I faced a similar issue and managed to resolve it by adjusting the number of inotify watches. I found helpful guidance on this matter at: https://github.com/parcel-bundler/parcel/issues/1427 https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers

To implement the solution, I used the following commands:

sudo sysctl fs.inotify.max_user_watches=999999999
and made it persistent with:

echo fs.inotify.max_user_watches=999999999 | sudo tee -a /etc/sysctl.conf 
sudo sysctl --system

Answer №2

Instead of using Yarn, try deleting your node_modules folder and then use NPM to install ('npm i') and run ('npm run start'). I encountered a similar issue when attempting to run my Node project with Yarn. I experimented with different versions of Node like v10.10.0 and v8.12.0. However, even after removing the node_modules folder and trying to reinstall with Yarn, the problem persisted.

Answer №3

Ensuring your Node.js version is up-to-date is crucial.

According to the official documentation, it is recommended to have Node version of 6 or higher on your local development machine.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Switch back to using npm instead of pnpm

After running into compatibility issues with other tools, I've come to the realization that I can't continue using pnpm in my project. Is there a smooth way for me to transition back to npm, my usual package manager? How would you suggest I appro ...

Unable to locate module: unable to resolve 'child_process' in '/home/fawad/pmc-frontend_master/node_modules/dialog'

When running npm run build, I encountered the following error: "module not found: cannot resolve 'child_process' in '/home/fawad/pmc-frontend_master/node_modules/dialog'". I tried installing child_process using both npm install child_pr ...

WebStorm and IntelliJ IDEA are unable to detect any custom NPM scripts within the NPM run/debug configuration

In both WebStorm 2016.3.2 and IntelliJ IDEA 2016.3.2, I am facing an issue with custom NPM scripts not appearing in the NPM run/debug configuration despite selecting the correct package.json file. The script section from my package.json file includes vari ...

Miniconda completed the installation of Yarn, however, the versions of npm and Nodejs that came with it are

Hey there, I'm looking to use miniconda for a small FARM project involving FastApi, React, and MongoDB. I prefer to use the Yarn package manager, but I'm running into some frustration because I can't upgrade Node.js and npm. conda create --n ...

Access the localhost:3000 webpage in kiosk mode once the Node.js server has fully started running

Currently, I am immersed in a Raspberry Pi project which requires me to operate a node server in kiosk mode. To prevent the default localhost opening upon server execution, I have implemented BROWSER=none. My intention is to use wait-on to ensure that th ...

Guide to incorporating Jquery-Comment into Angular versions 2 and beyond

I've incorporated the Jquery-Comment plugin into my Angular 2 project by adding the necessary script and css files to my Index.html page. However, when initializing the Comment TextBox id within a script tag, I encountered an error in the console. ...

Guide to installing a particular version of chromium for use with puppeteer

For my project, I have been using puppeteer. Typically, I would install both the puppeteer library and the browser itself using the npm i puppeteer command. However, now I am looking to separately install the browser. The version of puppeteer I am current ...

Which is better to use for Node.js: installing history.js through npm or using the individual files in the package?

For my Node.js project using Sails.js, I'm debating whether to npm install history.js or manually download and place the js files in my assets linker. If I go for npm install, the files available are: /bean /domready history.adapter.ender.js histor ...

Accessing the SQL database using Cypress

I am attempting to establish a connection with an SQL database using Cypress following the guidelines provided in the NPM guide. I have ensured that all dependencies are installed as specified, however, when I run the following query: cy.sqlServer('S ...

Troubleshooting Node.js: Fixing the "Error: ENOENT - File or directory not found" issue

Currently, I have successfully set up a Node.js web application on my production server. Now, I am trying to replicate the same setup on my development server. Node.js, NPM, and MongoDB are all installed on my development server just like in production. H ...

Upgrade your Webpack configuration in Create-React-App without having to eject

Running react-scripts version 5.0.1 In order to update Webpack to a minimum of 5.76.0, I prefer not to eject Create-React-App. What alternatives do I have? ...

Issue with installing chromedriver and selenium-driver on Windows 7 using NPM arise

I have a relatively basic package.json file with some development dependencies included. Here is what it looks like: "devDependencies": { "cssnano": "3.3.2", "cucumber": "0.9.2", "diff": "2.2.0", "grunt": "0.4.5", "jit-grunt": "0.9.1", " ...

Encountering issues with npm installation on OpenShift due to permission restrictions

Struggling with getting npm to work on openshift. When attempting to install a package using npm install, encounter the following error: $npm install bower npm ERR! Error: EACCES, mkdir '/var/lib/openshift/5425aaa04******0094/.npm' npm ERR! { [ ...

Creating Reports in Node.js with Node-Jasper Module

My current task involves creating a report using the node-jasper package in node.js. The code works perfectly fine without implementing classes, as shown below: jasper = require('node-jasper')({ path: '../lib/jasperreports-5.6.0&apo ...

Browser with Node's https.Agent

In my npm package written in TypeScript, I utilize axios to make web requests. One of the endpoints requires certificate authentication, so I pass new https.Agent to axios to include the necessary certificates. Everything works perfectly when the module is ...

Encountering an ASP.NET Boilerplate Angular Project Issue during npm start

I am utilizing the ASP.NET Boilerplate Framework which is built on .Net Core and Angular. I closely followed the guidelines outlined in this page for the startup template with Angular, but upon running npm start, I encountered the following error message: ...

Encountering difficulties with installing npm packages from a cloned GitHub repository

I am interested in forking the React Data Grid repository on Github from here. My plan is to make some modifications and then integrate it into my react application. To prepare for this, I have included the name, version, and description attributes within ...

The step-by-step guide to setting up the masonry-layout on a VUE

I recently added the Masonry Layout plugin using npm, but I'm facing issues with loading it into my component. import "masonry-layout"; export default { name: "playerSkillComponent", props: ['player'], mounted: function () ...

Error: The specified module 'tty' was not found in the directory '/workspace/node_modules/pace/node_modules/charm'

My attempt to compile my frontend project using ng build resulted in the following error message: ERROR in ./node_modules/pace/node_modules/charm/index.js Module not found: Error: Can't resolve 'tty' in '/workspace/node_modules/p ...

Setting a directive for my NPM Package without the need for global installation

After installing certain NPM packages in a project, you can run them from the project's scripts. An example of this is the webpack-dev-server. All I have to do after installation is add: "dev": "webpack-dev-server" To my project's package.json ...