jprichardson / node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
MIT License
9.44k stars 776 forks source link

error on import, in CodeSandBox > React native #982

Closed francis-vila closed 1 year ago

francis-vila commented 1 year ago

I created a fresh sandbox in CodeSandBox, based on the template React Native > github

I added the dependency to fs-extra

I added the import: import fs from "fs-extra"

I get the error TypeError process.emitWarning is not a function

Here is a copy of the package.json file:

  "name": "react-native",
  "version": "1.0.0",
  "description": "React Native for Web starter template",
  "keywords": [],
  "main": "src/index.js",
  "dependencies": {
    "fs-extra": "11.1.0",
    "react": "17.0.2",
    "react-art": "17.0.2",
    "react-dom": "17.0.2",
    "react-native-web": "0.16.1",
    "react-scripts": "4.0.3"
  },
  "devDependencies": {},
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}
RyanZim commented 1 year ago

fs-extra is designed to work with Node.js; AFAIK, it does not work in react-native.