Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added override for graceful-fs #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thomasfsteeples
Copy link

Running npm install && npx gulp, I get the following error:

fs.js:42
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:42:5
    at req_ (/home/steeps/Documents/personal_projects/svg-inject/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/home/steeps/Documents/personal_projects/svg-inject/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/home/steeps/Documents/personal_projects/svg-inject/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)

Node.js v18.16.0

This error occurs as svg-inject depends on gulp@3.9.1, which depends on graceful-fs@^3.0.0. graceful-fs@^3.0.0 monkey patches Node.js's fs module, but this stopped working after Node.js version 11.15. graceful-fs@^4.0.0 has been updated to work with more recent versions of Node.js, and the proposed pull request ensures this later version of the library is used. This fixes the above and allows npm install && npx gulp to run without error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant