Skip to content

[Windows] ReferenceError: primordials is not defined #12

Description

@JonLevin25

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
sync-files@1.0.3 C:\node-sync-files-master
+-- chokidar@1.7.0
| `-- readdirp@2.2.1
|   `-- graceful-fs@4.2.10
+-- fs-extra@0.16.5
| +-- graceful-fs@3.0.12
| `-- jsonfile@2.4.0
|   `-- graceful-fs@4.2.10  deduped
`-- update-notifier@0.3.2
  `-- configstore@0.3.2
    `-- graceful-fs@3.0.12

Steps:

  1. Run npm i
PS node-sync-files-master> npm i
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions