Skip to content

ReferenceError: primordials is not defined #27422

Closed
@package71

Description

@package71
  • Version: 12.0.0
  • Platform: MacOS 10.14, Debian 9
  • Subsystem: fs.js module
fs.js:27
const { Math, Object, Reflect } = primordials;
                                  ^

ReferenceError: primordials is not defined
    at fs.js:27:35
    at req_ (/Users/bdev/Documents/Projects/exchanger-api/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/Users/bdev/Documents/Projects/exchanger-api/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/Users/bdev/Documents/Projects/exchanger-api/node_modules/unzip/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/bdev/Documents/Projects/exchanger-api/node_modules/unzip/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/bdev/Documents/Projects/exchanger-api/node_modules/unzip/node_modules/fstream/lib/reader.js:4:10)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)

Activity

package71

package71 commented on Apr 26, 2019

@package71
Author

natives@1.1.6 already installed but did not solve the problem

targos

targos commented on Apr 26, 2019

@targos
Member

Node.js cannot support what the natives module is doing. It is often broken when a new major release of Node.js happens.
The solution to your problem is probably to use a more recent and maintained alternative to the unzip module.

aruprakshit

aruprakshit commented on Aug 11, 2019

@aruprakshit

I am having the same problem.. Anybody got a solution of this?

Pysis868

Pysis868 commented on Jun 23, 2020

@Pysis868

Had this error without gulp(!!) installing over old v10 installation on Windows using the msi package. Removing that directory's contents and repairing made it work. Why it does not take care in the first place..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @Pysis868@targos@aruprakshit@package71

        Issue actions

          ReferenceError: primordials is not defined · Issue #27422 · nodejs/node