CRYPTO NEWS

Node js: Error [OpenError]: IO error: /var/task/matic/exceptions/eth/LOCK: Read-only file system

Can someone help me? I am using node.JS 16.17.0 (includes npm 8.15.0). The code is working locally without errors, but not when I deploy it on Cyclic and Vercel.

This is the code –

const fs = require("fs"); const level = require("level"); const path = require("path");  fs.mkdir(path.join(__dirname, 'matic/exceptions'), {recursive: true}, (err) => { if (err) { return console.error(err);} }); fs.mkdir(path.join(__dirname, 'matic/exceptions/eth'), {recursive: true}, (err) => {if (err) {return console.error(err);} }); fs.mkdir(path.join(__dirname, 'matic/addresses'), {recursive: true}, (err) => {     if (err) {return console.error(err);} });  const dbEthExceptions = level(     path.join(__dirname, 'matic/exceptions/eth') ); const dbAddress = level(     path.join(__dirname, 'matic/addresses') ); 

// This is the Error //

/var/task/node_modules/level-packager/node_modules/levelup/lib/levelup.js:119           return callback(new OpenError(err))                           ^     2022-09-21 17:55:36.618: Error [OpenError]: IO error: /var/task/matic/exceptions/eth/LOCK: Read-only file system         at /var/task/node_modules/level-packager/node_modules/levelup/lib/levelup.js:119:23         at /var/task/node_modules/abstract-leveldown/abstract-leveldown.js:38:14         at /var/task/node_modules/level-packager/node_modules/deferred-leveldown/deferred-leveldown.js:31:21         at /var/task/node_modules/abstract-leveldown/abstract-leveldown.js:38:14         at /var/task/node_modules/abstract-leveldown/abstract-leveldown.js:38:14     Emitted 'error' event on LevelUP instance at:         at /var/task/node_modules/level-packager/node_modules/levelup/lib/levelup.js:60:19         at /var/task/node_modules/level-packager/node_modules/levelup/lib/levelup.js:119:14         at /var/task/node_modules/abstract-leveldown/abstract-leveldown.js:38:14         [... lines matching original stack trace ...]         at /var/task/node_modules/abstract-leveldown/abstract-leveldown.js:38:14 {       [cause]: undefined     } 

Node js: Error [OpenError]: IO error: /var/task/matic/exceptions/eth/LOCK: Read-only file system

Shopping cart
There are no products in the cart!
Continue shopping
0