node-sync-files icon indicating copy to clipboard operation
node-sync-files copied to clipboard

[Windows] ReferenceError: primordials is not defined

Open JonLevin25 opened this issue 2 years ago • 0 comments

Sytem: Windows 10 22H2 (19045.2604) Arch: x64 PC Node: v14.17.5

I'm getting an error in fs... ReferenceError: primordials is not defined Googling shows this might be something to do with graceful-fs and node versions.

graceful-fs ver: 4.2.10

> npm list graceful-fs
[email protected] C:\node-sync-files-master
+-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   `-- [email protected]  deduped
`-- [email protected]
  `-- [email protected]
    `-- [email protected]

Steps:

  1. Run npm i
PS node-sync-files-master> npm i
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

audited 250 packages in 0.838s

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

found 12 vulnerabilities (3 low, 3 moderate, 5 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
  1. Try to run index.js
PS node-sync-files-master> node .\index.js --watch -v --notify-update test.txt D:\test\test.txt
fs.js:45
} = primordials;
    ^
ReferenceError: primordials is not defined
    at fs.js:45:5
    at req_ node-sync-files-master\node_modules\natives\index.js:143:24)
    at Object.req [as require] (node-sync-files-master\node_modules\natives\index.js:55:10)
    at Object.<anonymous> (node-sync-files-master\node_modules\fs-extra\node_modules\graceful-fs\fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)

JonLevin25 avatar Feb 17 '23 13:02 JonLevin25