sass / node-sass

:rainbow: Node.js bindings to libsass

Home Page:https://npmjs.org/package/node-sass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected end of input v9.0 and 8.0

justintim-es opened this issue · comments

Dear NodeSass,
I am used to using you for customization of the bulma css framework but now i have this error

(node:2761) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm ERR! code 1
npm ERR! path /home/noahbergh/presale/frontendpsd/node_modules/bulma/cuschus/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! /home/noahbergh/presale/frontendpsd/node_modules/bulma/cuschus/node_modules/infer-owner/index.js:41
npm ERR!     const st = fs.lstatSync
npm ERR!                            
npm ERR! 
npm ERR! SyntaxError: Unexpected end of input
npm ERR!     at internalCompileFunction (node:internal/vm:73:18)
npm ERR!     at wrapSafe (node:internal/modules/cjs/loader:1153:20)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1197:27)
npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:1091:32)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:938:12)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:1115:19)
npm ERR!     at require (node:internal/modules/helpers:119:18)
npm ERR!     at Object.<anonymous> (/home/noahbergh/presale/frontendpsd/node_modules/bulma/cuschus/node_modules/make-fetch-happen/node_modules/cacache/lib/util/fix-owner.js:8:20)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1233:14)
npm ERR! 
npm ERR! Node.js v20.5.0

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-08-17T11_30_02_032Z-debug-0.log

Didn't had proper internet to check out v7.0 but could you solve this for us?

Here you can see what is missing in other words index.js line 41

const cache = new Map()
const fs = require('fs')
const { dirname, resolve } = require('path')


const lstat = path => new Promise((res, rej) =>
  fs.lstat(path, (er, st) => er ? rej(er) : res(st)))

const inferOwner = path => {
  path = resolve(path)
  if (cache.has(path))
    return Promise.resolve(cache.get(path))

  const statThen = st => {
    const { uid, gid } = st
    cache.set(path, { uid, gid })
    return { uid, gid }
  }
  const parent = dirname(path)
  const parentTrap = parent === path ? null : er => {
    return inferOwner(parent).then((owner) => {
      cache.set(path, owner)
      return owner
    })
  }
  return lstat(path).then(statThen, parentTrap)
}

const inferOwnerSync = path => {
  path = resolve(path)
  if (cache.has(path))
    return cache.get(path)

  const parent = dirname(path)

  // avoid obscuring call site by re-throwing
  // "catch" the error by returning from a finally,
  // only if we're not at the root, and the parent call works.
  let threw = true
  try {
    const st = fs.lstatSync

That isn't our code, and no we can't troubleshoot it for you