Code Monkey home page Code Monkey logo

Comments (8)

TBHGodPro avatar TBHGodPro commented on May 27, 2024

could you go to the solarstats folder, go to the scripts subfolder, open the clean.js file and send the code inside it?

from solarstats-old.

M1noa avatar M1noa commented on May 27, 2024

could you go to the solarstats folder, go to the scripts subfolder, open the clean.js file and send the code inside it?

I think I will try installing LTS, I don't know if I already have LTS, but il install it anyway.
Update: It didn't work

My code editor says this:
image

Code:

const fs = require('fs');
const { join } = require('path');

function handleENOENT(error) {
  if (!error.message.includes('ENOENT')) throw error;
}

try {
  console.log('info: cleaning build folder... 🏗️');
  fs.rmSync(join(__dirname, '..', 'build'), { recursive: true });
} catch (error) {
  handleENOENT(error);
}

try {
  console.log('info: cleaning dist folder... 🚚️');
  fs.rmSync(join(__dirname, '..', 'dist', 'solarstats.exe'));
} catch (error) {
  handleENOENT(error);
}

console.log('info: clean complete! 🗑️\n');

from solarstats-old.

TBHGodPro avatar TBHGodPro commented on May 27, 2024

Alright try putting this as the clean.js code and running.

const fs = require('fs');
const { join } = require('path');

console.log(fs, fs.rmSync);

function handleENOENT(error) {
  if (!error.message.includes('ENOENT')) throw error;
}

try {
  console.log('info: cleaning build folder... 🏗️');
  fs.rmSync(join(__dirname, '..', 'build'), { recursive: true });
} catch (error) {
  handleENOENT(error);
}

try {
  console.log('info: cleaning dist folder... 🚚️');
  fs.rmSync(join(__dirname, '..', 'dist', 'solarstats.exe'));
} catch (error) {
  handleENOENT(error);
}

console.log('info: clean complete! 🗑️\n');

Then send the console results here

from solarstats-old.

M1noa avatar M1noa commented on May 27, 2024

Alright try putting this as the clean.js code and running.

const fs = require('fs');
const { join } = require('path');

console.log(fs, fs.rmSync);

function handleENOENT(error) {
  if (!error.message.includes('ENOENT')) throw error;
}

try {
  console.log('info: cleaning build folder... 🏗️');
  fs.rmSync(join(__dirname, '..', 'build'), { recursive: true });
} catch (error) {
  handleENOENT(error);
}

try {
  console.log('info: cleaning dist folder... 🚚️');
  fs.rmSync(join(__dirname, '..', 'dist', 'solarstats.exe'));
} catch (error) {
  handleENOENT(error);
}

console.log('info: clean complete! 🗑️\n');

Then send the console results here

PS C:\Users\Minoa\desktop\SolarStats> npm run build

> [email protected] build
> npm run clean && node ./scripts/build.js


> [email protected] clean
> node ./scripts/clean.js

{ constants:
   { O_RDONLY: 0,
     O_WRONLY: 1,
     O_RDWR: 2,
     S_IFMT: 61440,
     S_IFREG: 32768,
     S_IFDIR: 16384,
     S_IFCHR: 8192,
     S_IFLNK: 40960,
     O_CREAT: 256,
     O_EXCL: 1024,
     O_TRUNC: 512,
     O_APPEND: 8,
     F_OK: 0,
     R_OK: 4,
     W_OK: 2,
     X_OK: 1 },
  Stats: [Function: Stats],
  F_OK: 0,
  R_OK: 4,
  W_OK: 2,
  X_OK: 1,
  access: [Function],
  accessSync: [Function],
  exists: [Function],
  existsSync: [Function],
  readFile: [Function],
  readFileSync: [Function],
  close: [Function],
  closeSync: [Function],
  open: [Function],
  openSync: [Function],
  read: [Function],
  readSync: [Function],
  write: [Function],
  writeSync: [Function],
  rename: [Function],
  renameSync: [Function],
  truncate: [Function],
  truncateSync: [Function],
  ftruncate: [Function],
  ftruncateSync: [Function],
  rmdir: [Function],
  rmdirSync: [Function],
  fdatasync: [Function],
  fdatasyncSync: [Function],
  fsync: [Function],
  fsyncSync: [Function],
  mkdir: [Function],
  mkdirSync: [Function],
  readdir: [Function],
  readdirSync: [Function],
  fstat: [Function],
  lstat: [Function],
  stat: [Function],
  fstatSync: [Function],
  lstatSync: [Function],
  statSync: [Function],
  readlink: [Function],
  readlinkSync: [Function],
  symlink: [Function],
  symlinkSync: [Function],
  link: [Function],
  linkSync: [Function],
  unlink: [Function],
  unlinkSync: [Function],
  fchmod: [Function],
  fchmodSync: [Function],
  chmod: [Function],
  chmodSync: [Function],
  fchown: [Function],
  fchownSync: [Function],
  chown: [Function],
  chownSync: [Function],
  _toUnixTimestamp: [Function: toUnixTimestamp],
  utimes: [Function],
  utimesSync: [Function],
  futimes: [Function],
  futimesSync: [Function],
  writeFile: [Function],
  writeFileSync: [Function],
  appendFile: [Function],
  appendFileSync: [Function],
  watch: [Function],
  watchFile: [Function],
  unwatchFile: [Function],
  realpathSync: [Function: realpathSync],
  realpath: [Function: realpath],
  mkdtemp: [Function],
  mkdtempSync: [Function],
  createReadStream: [Function],
  ReadStream:
   { [Function: ReadStream]
     super_:
      { [Function: Readable]
        ReadableState: [Function: ReadableState],
        super_: [Object],
        _fromList: [Function: fromList] } },
  FileReadStream:
   { [Function: ReadStream]
     super_:
      { [Function: Readable]
        ReadableState: [Function: ReadableState],
        super_: [Object],
        _fromList: [Function: fromList] } },
  createWriteStream: [Function],
  WriteStream:
   { [Function: WriteStream]
     super_: { [Function: Writable] WritableState: [Function: WritableState], super_: [Object] } },
  FileWriteStream:
   { [Function: WriteStream]
     super_: { [Function: Writable] WritableState: [Function: WritableState], super_: [Object] } } } undefined
info: cleaning build folder... 🏗️
C:\Users\Minoa\desktop\SolarStats\scripts\clean.js:7
  if (!error.message.includes('ENOENT')) throw error;
                                         ^

TypeError: fs.rmSync is not a function
    at Object.<anonymous> (C:\Users\Minoa\desktop\SolarStats\scripts\clean.js:12:6)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:387:7)
    at startup (bootstrap_node.js:153:9)
    at bootstrap_node.js:500:3
PS C:\Users\Minoa\desktop\SolarStats>

from solarstats-old.

TBHGodPro avatar TBHGodPro commented on May 27, 2024

alright try running npm update; npm ci

from solarstats-old.

M1noa avatar M1noa commented on May 27, 2024

alright try running npm update; npm ci

I did it then I ran NPM run build, and it still doesn't work

C:\Users\Minoa\Desktop\SolarStats>npm run build

> [email protected] build
> npm run clean && node ./scripts/build.js


> [email protected] clean
> node ./scripts/clean.js

{ constants:
   { O_RDONLY: 0,
     O_WRONLY: 1,
     O_RDWR: 2,
     S_IFMT: 61440,
     S_IFREG: 32768,
     S_IFDIR: 16384,
     S_IFCHR: 8192,
     S_IFLNK: 40960,
     O_CREAT: 256,
     O_EXCL: 1024,
     O_TRUNC: 512,
     O_APPEND: 8,
     F_OK: 0,
     R_OK: 4,
     W_OK: 2,
     X_OK: 1 },
  Stats: [Function: Stats],
  F_OK: 0,
  R_OK: 4,
  W_OK: 2,
  X_OK: 1,
  access: [Function],
  accessSync: [Function],
  exists: [Function],
  existsSync: [Function],
  readFile: [Function],
  readFileSync: [Function],
  close: [Function],
  closeSync: [Function],
  open: [Function],
  openSync: [Function],
  read: [Function],
  readSync: [Function],
  write: [Function],
  writeSync: [Function],
  rename: [Function],
  renameSync: [Function],
  truncate: [Function],
  truncateSync: [Function],
  ftruncate: [Function],
  ftruncateSync: [Function],
  rmdir: [Function],
  rmdirSync: [Function],
  fdatasync: [Function],
  fdatasyncSync: [Function],
  fsync: [Function],
  fsyncSync: [Function],
  mkdir: [Function],
  mkdirSync: [Function],
  readdir: [Function],
  readdirSync: [Function],
  fstat: [Function],
  lstat: [Function],
  stat: [Function],
  fstatSync: [Function],
  lstatSync: [Function],
  statSync: [Function],
  readlink: [Function],
  readlinkSync: [Function],
  symlink: [Function],
  symlinkSync: [Function],
  link: [Function],
  linkSync: [Function],
  unlink: [Function],
  unlinkSync: [Function],
  fchmod: [Function],
  fchmodSync: [Function],
  chmod: [Function],
  chmodSync: [Function],
  fchown: [Function],
  fchownSync: [Function],
  chown: [Function],
  chownSync: [Function],
  _toUnixTimestamp: [Function: toUnixTimestamp],
  utimes: [Function],
  utimesSync: [Function],
  futimes: [Function],
  futimesSync: [Function],
  writeFile: [Function],
  writeFileSync: [Function],
  appendFile: [Function],
  appendFileSync: [Function],
  watch: [Function],
  watchFile: [Function],
  unwatchFile: [Function],
  realpathSync: [Function: realpathSync],
  realpath: [Function: realpath],
  mkdtemp: [Function],
  mkdtempSync: [Function],
  createReadStream: [Function],
  ReadStream:
   { [Function: ReadStream]
     super_:
      { [Function: Readable]
        ReadableState: [Function: ReadableState],
        super_: [Object],
        _fromList: [Function: fromList] } },
  FileReadStream:
   { [Function: ReadStream]
     super_:
      { [Function: Readable]
        ReadableState: [Function: ReadableState],
        super_: [Object],
        _fromList: [Function: fromList] } },
  createWriteStream: [Function],
  WriteStream:
   { [Function: WriteStream]
     super_: { [Function: Writable] WritableState: [Function: WritableState], super_: [Object] } },
  FileWriteStream:
   { [Function: WriteStream]
     super_: { [Function: Writable] WritableState: [Function: WritableState], super_: [Object] } } } undefined
info: cleaning build folder... 🏗️
C:\Users\Minoa\Desktop\SolarStats\scripts\clean.js:7
  if (!error.message.includes('ENOENT')) throw error;
                                         ^

TypeError: fs.rmSync is not a function
    at Object.<anonymous> (C:\Users\Minoa\Desktop\SolarStats\scripts\clean.js:12:6)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:387:7)
    at startup (bootstrap_node.js:153:9)
    at bootstrap_node.js:500:3

from solarstats-old.

TBHGodPro avatar TBHGodPro commented on May 27, 2024

bro what

try deleting the node_modules folder, and then run npm install; npm run build

from solarstats-old.

M1noa avatar M1noa commented on May 27, 2024

bro what

try deleting the node_modules folder, and then run npm install; npm run build

C:\Users\Minoa\Desktop\SolarStats>npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@minecraft-js/[email protected]',
npm WARN EBADENGINE   required: { node: '>=18.x' },
npm WARN EBADENGINE   current: { node: 'v16.17.0', npm: '8.15.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@minecraft-js/[email protected]',
npm WARN EBADENGINE   required: { node: '>=18.x' },
npm WARN EBADENGINE   current: { node: 'v16.17.0', npm: '8.15.0' }
npm WARN EBADENGINE }

added 381 packages, and audited 382 packages in 9s

65 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

C:\Users\Minoa\Desktop\SolarStats>npm run build

> [email protected] build
> npm run clean && node ./scripts/build.js


> [email protected] clean
> node ./scripts/clean.js

{ constants:
   { O_RDONLY: 0,
     O_WRONLY: 1,
     O_RDWR: 2,
     S_IFMT: 61440,
     S_IFREG: 32768,
     S_IFDIR: 16384,
     S_IFCHR: 8192,
     S_IFLNK: 40960,
     O_CREAT: 256,
     O_EXCL: 1024,
     O_TRUNC: 512,
     O_APPEND: 8,
     F_OK: 0,
     R_OK: 4,
     W_OK: 2,
     X_OK: 1 },
  Stats: [Function: Stats],
  F_OK: 0,
  R_OK: 4,
  W_OK: 2,
  X_OK: 1,
  access: [Function],
  accessSync: [Function],
  exists: [Function],
  existsSync: [Function],
  readFile: [Function],
  readFileSync: [Function],
  close: [Function],
  closeSync: [Function],
  open: [Function],
  openSync: [Function],
  read: [Function],
  readSync: [Function],
  write: [Function],
  writeSync: [Function],
  rename: [Function],
  renameSync: [Function],
  truncate: [Function],
  truncateSync: [Function],
  ftruncate: [Function],
  ftruncateSync: [Function],
  rmdir: [Function],
  rmdirSync: [Function],
  fdatasync: [Function],
  fdatasyncSync: [Function],
  fsync: [Function],
  fsyncSync: [Function],
  mkdir: [Function],
  mkdirSync: [Function],
  readdir: [Function],
  readdirSync: [Function],
  fstat: [Function],
  lstat: [Function],
  stat: [Function],
  fstatSync: [Function],
  lstatSync: [Function],
  statSync: [Function],
  readlink: [Function],
  readlinkSync: [Function],
  symlink: [Function],
  symlinkSync: [Function],
  link: [Function],
  linkSync: [Function],
  unlink: [Function],
  unlinkSync: [Function],
  fchmod: [Function],
  fchmodSync: [Function],
  chmod: [Function],
  chmodSync: [Function],
  fchown: [Function],
  fchownSync: [Function],
  chown: [Function],
  chownSync: [Function],
  _toUnixTimestamp: [Function: toUnixTimestamp],
  utimes: [Function],
  utimesSync: [Function],
  futimes: [Function],
  futimesSync: [Function],
  writeFile: [Function],
  writeFileSync: [Function],
  appendFile: [Function],
  appendFileSync: [Function],
  watch: [Function],
  watchFile: [Function],
  unwatchFile: [Function],
  realpathSync: [Function: realpathSync],
  realpath: [Function: realpath],
  mkdtemp: [Function],
  mkdtempSync: [Function],
  createReadStream: [Function],
  ReadStream:
   { [Function: ReadStream]
     super_:
      { [Function: Readable]
        ReadableState: [Function: ReadableState],
        super_: [Object],
        _fromList: [Function: fromList] } },
  FileReadStream:
   { [Function: ReadStream]
     super_:
      { [Function: Readable]
        ReadableState: [Function: ReadableState],
        super_: [Object],
        _fromList: [Function: fromList] } },
  createWriteStream: [Function],
  WriteStream:
   { [Function: WriteStream]
     super_: { [Function: Writable] WritableState: [Function: WritableState], super_: [Object] } },
  FileWriteStream:
   { [Function: WriteStream]
     super_: { [Function: Writable] WritableState: [Function: WritableState], super_: [Object] } } } undefined
info: cleaning build folder... 🏗️
C:\Users\Minoa\Desktop\SolarStats\scripts\clean.js:7
  if (!error.message.includes('ENOENT')) throw error;
                                         ^

TypeError: fs.rmSync is not a function
    at Object.<anonymous> (C:\Users\Minoa\Desktop\SolarStats\scripts\clean.js:12:6)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:387:7)
    at startup (bootstrap_node.js:153:9)
    at bootstrap_node.js:500:3

from solarstats-old.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.