"module 'crypto' does not exist" with MongoDB - node.js

I have a react native app that I'm building along with MongoDB (using a remote MongoDB Atlas db, installed with the npm mongodb driver), and I keep running into the following error:
bundling failed: Error: Unable to resolve module "crypto" from "../node_modules/mongodb/lib/db.js" : Module "crypto" does not exist in the Haste module map or in these directories: ...
I understand that npm crypto is no longer used, as it is now a built-in Node module, but what's going on here if it's built-in then?
How do I resolve this issue? My dependency file is listed below:
"dependencies": {
"#remobile/react-native-mongoose": "^1.0.1",
"#tradle/react-native-http": "^2.0.1",
"assert": "^1.4.1",
"asyncstorage-down": "^4.0.1",
"babel-preset-env": "^1.7.0",
"body-parser": "^1.18.3",
"browserify-zlib": "^0.1.4",
"bson": "^3.0.0",
"console-browserify": "^1.1.0",
"constants-browserify": "^1.0.0",
"create-react-class": "^15.6.3",
"dns.js": "^1.0.1",
"domain-browser": "^1.2.0",
"eslint": "^3.19.0",
"events": "^3.0.0",
"express": "^4.16.3",
"https-browserify": "0.0.1",
"husky": "^0.14.3",
"kerberos": "0.0.24",
"lint-staged": "^7.2.0",
"moment": "^2.22.2",
"mongodb": "^3.0.10",
"mongojs": "^2.6.0",
"mongoose": "^5.1.6",
"morgan": "^1.9.0",
"native-base": "^2.6.0",
"path-browserify": "0.0.0",
"process": "^0.11.10",
"querystring-es3": "^0.2.1",
"react": "^16.3.1",
"react-native": "^0.55.4",
"react-native-crypto": "^2.1.2",
"react-native-level-fs": "^3.0.1",
"react-native-os": "^1.2.1",
"react-native-randombytes": "^3.2.0",
"react-native-size-matters": "^0.1.1",
"react-native-splash-screen": "^3.0.7",
"react-native-tcp": "^3.3.0",
"react-native-udp": "^2.3.1",
"react-navigation": "^2.4.1",
"readable-stream": "^1.0.33",
"require_optional": "^1.0.1",
"stream-browserify": "^1.0.0",
"string_decoder": "^0.10.31",
"timers-browserify": "^1.4.2",
"tty-browserify": "0.0.0",
"url": "^0.10.3",
"util": "^0.11.0",
"vm-browserify": "0.0.4"
}

Related

Issue "TypeError: external_defu_ is not a function" running generate on gitlab

every time I try to launch the generate for my nuxt project on gitlab, I get back for every page generated a strange error,
[error] /Dashboard
TypeError: external_defu_ is not a function
at server.js:12669:45
at Array.reduce (<anonymous>)
at new runtime_BaseScheme (node_modules/#nuxtjs/auth-next/dist/runtime.mjs:883:0)
at new runtime_Oauth2Scheme (node_modules/#nuxtjs/auth-next/dist/runtime.mjs:1137:0)
at auth (node_modules/.cache/nuxt/auth.js:45:0)
at createApp (node_modules/.cache/nuxt/index.js:291:0)
at runNextTicks (node:internal/process/task_queues:61:5)
at listOnTimeout (node:internal/timers:526:9)
at processTimers (node:internal/timers:500:7)
at async module.exports.__webpack_exports__.default (node_modules/.cache/nuxt/server.js:85:0)
This prevents the page from generating itself correctly.
While if I launch the project locally, with the same version of node, it generates everything correctly.
Do you know how I can solve the problem?
In gitlab's docker I'm using node v12.16.3.
This is my package.json
{
"name": "xxx",
"version": "1.0.0",
"description": "xxx",
"author": "Alessandro",
"private": true,
"scripts": {
"generate": "ENV=production nuxt generate",
generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
},
"dependencies": {
"#nuxtjs/auth": "^4.9.1",
"#nuxtjs/auth-next": "5.0.0-1613647907.37b1156",
"#nuxtjs/axios": "^5.13.1",
"#nuxtjs/pwa": "^3.3.4",
"#vue/composition-api": "^0.6.7",
"aws-sdk": "^2.610.0",
"axios": "^0.21.1",
"bcryptjs": "^2.4.3",
"browser-image-compression": "^1.0.14",
"caniuse-lite": "^1.0.30001257",
"chart.js": "^2.9.3",
"child_process": "^1.0.2",
"compass": "^0.1.1",
"cookie": "^0.4.0",
"cookie-universal-nuxt": "^2.1.4",
"cors": "^2.8.5",
"cross-fetch": "^3.1.5",
"file-saver": "^2.0.2",
"fs": "0.0.1-security",
"gapi-script": "^1.2.0",
"install": "^0.13.0",
"js-cookie": "^2.2.1",
"kaleidoscopejs": "1.0.18",
"leaflet": "^1.6.0",
"lodash": "^4.17.15",
"md5": "^2.2.1",
"moment": "^2.29.3",
"multer": "^1.4.2",
"net": "^1.0.2",
"node-fetch": "^2.6.7",
"node-orientdb-http": "^0.1.1",
"npm": "^8.13.1",
"nuxt": "^2.15.0",
"nuxt-gmaps": "^1.2.10",
"nuxt-i18n": "^6.3.0",
"nuxt-leaflet": "0.0.19",
"nuxt-sass-resources-loader": "^2.0.5",
"p-iteration": "^1.1.8",
"pannellum": "github:saidmoya12/pannellum",
"panolens": "^0.12.1",
"proxy": "^1.0.2",
"readline": "^1.3.0",
"simple-analytics-vue": "^1.1.5",
"tls": "0.0.1",
"videojs": "^1.0.0",
"videojs-panorama": "^0.1.7",
"vue": "2.6.14",
"vue-chartjs": "^3.5.0",
"vue-cookie-accept-decline": "^5.3.1",
"vue-expandable-image": "^0.1.0",
"vue-google-login": "^2.0.3",
"vue-pannellum": "^0.5.3",
"vue-plausible": "^1.2.1",
"vue-rangedate-picker": "^1.0.0",
"vue-rangedate-picker-winslow": "^1.0.8",
"vue-server-renderer": "^2.6.12",
"vue-template-compiler": "^2.6.12",
"vue-tooltipster": "^1.2.0",
"vue-upload-multiple-image": "^1.1.4",
"vue2-google-maps": "^0.10.7",
"vue2-leaflet": "^2.6.0",
"vuedraggable": "^2.23.2",
"vuejs-panorama": "^1.1.9",
"vuejs-vr": "^1.2.2",
"vuetify": "^2.5.12",
"vuex-persistedstate": "^3.0.1",
"webpack": "^4.45.0"
},
"devDependencies": {
"#aceforth/nuxt-optimized-images": "^1.4.0",
"#nuxt/bridge": "npm:#nuxt/bridge-edge#^3.0.0-27268729.5b8e10f",
"#nuxt/image": "^0.7.1",
"#nuxt/types": "^2.14.12",
"#nuxtjs/dotenv": "^1.4.1",
"#nuxtjs/eslint-config": "^3.1.0",
"#nuxtjs/eslint-module": "^2.0.0",
"#nuxtjs/google-analytics": "^2.4.0",
"#nuxtjs/vuetify": "^1.12.3",
"babel-eslint": "^10.0.1",
"eslint": "^7.5.0",
"eslint-plugin-nuxt": ">=0.4.2",
"imagemin-gifsicle": "^7.0.0",
"imagemin-mozjpeg": "^9.0.0",
"imagemin-pngquant": "^9.0.2",
"imagemin-svgo": "^9.0.0",
"lqip-loader": "^2.2.1",
"responsive-loader": "^2.3.0",
"rimraf": "^3.0.2",
"sharp": "^0.30.7",
"sqip-loader": "^1.0.0",
"webp-loader": "^0.6.0"
}
}
Thank you very much
Alessandro
I also had this issue on Nuxt2 Bridge using #nuxtjs/auth-next. The solution is to transpile defu during the build:
nuxt.config.js
export default defineNuxtConfig({
// ...
build: {
transpile: [
'defu',
],
},
})
The issue and possible solutions are described in the docs: https://v3.nuxtjs.org/guide/going-further/esm/

How to fix “Npm ERR! JSON.parse Unexpected string in JSON at position 5096”

I'm very new and I'm trying to stick to the steps followed by an instructor in Coursera. And I get an error after doing several steps and trying to run lite-server with npm run dev command in CMD:
C:\Users\Spifet\Documents\guia-hoteles>npm run dev
npm ERR! code EJSONPARSE
npm ERR! path C:\Users\Spifet\Documents\guia-hoteles/package.json
npm ERR! JSON.parse Unexpected string in JSON at position 5096 while parsing '{
npm ERR! JSON.parse "devDependencies": {
npm ERR! JSON.parse "lite-serve'
npm ERR! JSON.parse Failed to parse JSON data.
npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Spifet\AppData\Local\npm-cache\_logs\2020-11-01T03_21_13_999Z-debug.log
This is how my package.json currently looks like:
{
"devDependencies": {
"lite-server": "^2.5.4"
},
"name": "guia-hoteles",
"version": "1.0.0",
"main": "index.js",
"dependencies": {
"after": "^0.8.2",
"arraybuffer.slice": "^0.0.7",
"accepts": "^1.3.7",
"anymatch": "^3.1.1",
"async": "^1.5.2",
"async-each-series": "^0.1.1",
"ansi-regex": "^2.1.1",
"backo2": "^1.0.2",
"async-limiter": "^1.0.1",
"ansi-styles": "^2.2.1",
"base64id": "^1.0.0",
"batch": "^0.6.1",
"better-assert": "^1.0.2",
"balanced-match": "^1.0.0",
"binary-extensions": "^2.1.0",
"axios": "^0.19.0",
"blob": "^0.0.5",
"brace-expansion": "^1.1.11",
"base64-arraybuffer": "^0.1.5",
"braces": "^3.0.2",
"browser-sync": "^2.26.13",
"browser-sync-client": "^2.26.13",
"browser-sync-ui": "^2.26.13",
"bs-recipes": "^1.3.4",
"callsite": "^1.0.0",
"camelcase": "^5.3.1",
"bytes": "^3.1.0",
"bs-snippet-injector": "^2.0.1",
"color-name": "^1.1.3",
"cliui": "^6.0.0",
"color-convert": "^1.9.3",
"component-bind": "^1.0.0",
"component-inherit": "^0.0.3",
"commander": "^2.20.3",
"component-emitter": "^1.3.0",
"chokidar": "^3.4.3",
"concat-map": "^0.0.1",
"connect": "^3.6.6",
"connect-logger": "^0.0.1",
"cookie": "^0.3.1",
"debug": "^2.6.9",
"depd": "^1.1.2",
"connect-history-api-fallback": "^1.6.0",
"dev-ip": "^1.0.1",
"destroy": "^1.0.4",
"chalk": "^1.1.3",
"decamelize": "^1.2.0",
"dlv": "^1.1.3",
"eazy-logger": "^3.1.0",
"emoji-regex": "^8.0.0",
"ee-first": "^1.1.1",
"escape-html": "^1.0.3",
"easy-extender": "^2.3.4",
"engine.io": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"engine.io-client": "^3.4.4",
"etag": "^1.8.1",
"encodeurl": "^1.0.2",
"finalhandler": "^1.1.0",
"engine.io-parser": "^2.1.3",
"fill-range": "^7.0.1",
"fresh": "^0.5.2",
"eventemitter3": "^4.0.7",
"follow-redirects": "^1.13.0",
"get-caller-file": "^2.0.5",
"find-up": "^4.1.0",
"glob-parent": "^5.1.1",
"fsevents": "^2.1.3",
"has-ansi": "^2.0.0",
"has-binary2": "^1.0.3",
"fs-extra": "^3.0.1",
"graceful-fs": "^4.2.4",
"immutable": "^3.8.2",
"http-proxy": "^1.18.1",
"iconv-lite": "^0.4.24",
"indexof": "^0.0.1",
"inherits": "^2.0.4",
"is-binary-path": "^2.1.0",
"http-errors": "^1.7.3",
"is-extglob": "^2.1.1",
"is-number": "^7.0.0",
"is-buffer": "^2.0.4",
"is-glob": "^4.0.1",
"is-fullwidth-code-point": "^3.0.0",
"has-cors": "^1.1.0",
"is-number-like": "^1.0.8",
"is-wsl": "^1.1.0",
"jsonfile": "^3.0.1",
"locate-path": "^5.0.0",
"limiter": "^1.1.5",
"localtunnel": "^2.0.0",
"lodash.isfinite": "^3.3.2",
"mime": "^1.4.1",
"mime-db": "^1.44.0",
"micromatch": "^4.0.2",
"isarray": "^2.0.1",
"minimatch": "^3.0.4",
"mime-types": "^2.1.27",
"mitt": "^1.2.0",
"object-component": "^0.0.3",
"ms": "^2.0.0",
"normalize-path": "^3.0.0",
"openurl": "^1.1.1",
"on-finished": "^2.3.0",
"negotiator": "^0.6.2",
"opn": "^5.3.0",
"p-locate": "^4.1.0",
"parseqs": "^0.0.6",
"parseuri": "^0.0.6",
"parseurl": "^1.3.3",
"p-try": "^2.2.0",
"p-limit": "^2.3.0",
"picomatch": "^2.2.2",
"path-exists": "^4.0.0",
"minimist": "^1.2.0",
"qs": "^6.2.3",
"portscanner": "^2.1.1",
"range-parser": "^1.2.1",
"readdirp": "^3.5.0",
"raw-body": "^2.4.1",
"resp-modifier": "^6.0.2",
"requires-port": "^1.0.0",
"require-main-filename": "^2.0.0",
"rx": "^4.1.0",
"require-directory": "^2.1.1",
"rxjs": "^5.5.12",
"serve-index": "^1.9.1",
"safer-buffer": "^2.1.2",
"send": "^0.16.2",
"serve-static": "^1.13.2",
"server-destroy": "^1.0.1",
"safe-buffer": "^5.1.2",
"socket.io-adapter": "^1.1.2",
"socket.io": "^2.1.1",
"socket.io-parser": "^3.2.0",
"setprototypeof": "^1.1.1",
"statuses": "^1.3.1",
"strip-ansi": "^3.0.1",
"stream-throttle": "^0.1.3",
"socket.io-client": "^2.3.1",
"supports-color": "^2.0.0",
"symbol-observable": "^1.0.1",
"string-width": "^4.2.0",
"set-blocking": "^2.0.0",
"toidentifier": "^1.0.0",
"to-regex-range": "^5.0.1",
"tfunk": "^4.0.0",
"to-array": "^0.1.4",
"unpipe": "^1.0.0",
"ua-parser-js": "^0.7.22",
"universalify": "^0.1.2",
"ultron": "^1.1.1",
"utils-merge": "^1.0.1",
"which-module": "^2.0.0",
"wrap-ansi": "^6.2.0",
"ws": "^3.3.3",
"yargs-parser": "^18.1.3",
"y18n": "^4.0.0",
"yeast": "^0.1.2",
"lodash": "^4.17.20",
"xmlhttprequest-ssl": "^1.5.5",
"moment": "^2.29.1",
"yargs": "^15.4.1"
},
"scripts": {
"dev" : "lite-server",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://Spifet#bitbucket.org/Spifet/guia-hoteles.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"homepage": "https://bitbucket.org/Spifet/guia-hoteles"
"description": ""
}
Could anyone please tell me how to fix it?
Thanks in advance!

Node Sass does not yet support your current environment: Vuetify upgrade fails

I'm trying to upgrade Vuetify 1.5.+ to 2.0.+ but facing some issues while adding node-sass library. Initially when I installed sass-loader": "^8.0.0" it showing some syntax error as follows.
So in order to fix the issue, I just downgraded sass-loader from 8.+ to 7.+ after that it throwing some other issue as follows.
After that, I just tried different versions and all showing the same issue and within the link its shows as supported - https://github.com/sass/node-sass/releases/tag/v4.9.4(OSX and node version 10). Even I'd tried different node version and nothing seems to be working.
Current node version : v10.16.3
package.json :
{
/***.. ................ other details ******/
"dependencies": {
"#mdi/font": "^3.5.95",
"#nuxtjs/axios": "^5.3.6",
"#nuxtjs/pwa": "^2.6.0",
"await-to-js": "^2.1.1",
"boxen": "^3.1.0",
"cli-table": "^0.3.1",
"colors": "^1.3.3",
"commander": "^2.19.0",
"cross-env": "^5.2.0",
"debug": "^4.1.1",
"emittery": "^0.4.1",
"express": "^4.16.4",
"fast-levenshtein": "^2.0.6",
"glob": "^7.1.3",
"jsonfile": "^5.0.0",
"knex": "^0.19.2",
"lodash": "^4.17.11",
"material-design-icons": "^3.0.1",
"mkdirp": "^0.5.1",
"moment": "^2.24.0",
"monaco-editor": "^0.16.2",
"monaco-editor-webpack-plugin": "^1.7.0",
"monaco-themes": "^0.2.5",
"mssql": "^5.0.5",
"mysql": "^2.16.0",
"nano-assign": "^1.0.1",
"nodemailer": "^6.3.0",
"nuxt": "^2.8.1",
"nuxt-material-design-icons": "^1.0.4",
"oracledb": "^3.1.2",
"pg": "^7.9.0",
"pify": "^4.0.1",
"popper.js": "^1.14.7",
"rmdir": "^1.2.0",
"sql-formatter": "^2.3.2",
"sqlite3": "^4.0.8",
"stripe": "^6.32.0",
"tcp-port-used": "^1.0.1",
"v-hotkey": "^0.3.1",
"vee-validate": "^2.2.0",
"vue": "^2.6.10",
"vue-click-outside": "^1.0.7",
"vue-drag-resize": "^1.3.2",
"vue-draggable-resizable": "^2.0.0-rc1",
"vue-monaco": "^0.3.1",
"vue-recaptcha": "^1.1.1",
"vue-shortcuts": "^1.1.2",
"vue-shortkey": "^3.1.7",
"vue-stripe-elements-plus": "^0.2.9",
"vuetify": "^2.0.18",
"vuetify-loader": "^1.2.1",
"vuex-persistedstate": "^2.5.4"
},
"devDependencies": {
"babel-eslint": "^10.0.1",
"chai": "^4.2.0",
"chokidar": "^2.1.5",
"cross-env": "^5.1.4",
"deepmerge": "^4.0.0",
"devtron": "^1.4.0",
"electron": "^4.1.4",
"electron-builder": "^20.39.0",
"electron-devtools-installer": "^2.2.4",
"electron-renderer": "^2.0.4",
"eslint": "6.4.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-config-prettier": "^4.1.0",
"eslint-config-standard": ">=12.0.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^2.1.2",
"eslint-plugin-import": ">=2.16.0",
"eslint-plugin-jest": ">=22.3.0",
"eslint-plugin-mocha": "^5.3.0",
"eslint-plugin-node": ">=8.0.1",
"eslint-plugin-nuxt": ">=0.4.2",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-promise": ">=4.0.1",
"eslint-plugin-standard": ">=4.0.0",
"eslint-plugin-vue": "^5.2.2",
"fibers": "^4.0.1",
"jsdoc": "^3.5.5",
"minami": "^1.2.3",
"mocha": "^6.0.2",
"node-sass": "4.9.4",
"nodemon": "^1.18.9",
"nyc": "^14.1.1",
"prettier": "^1.16.4",
"sass": "^1.22.12",
"sass-loader": "^7.1.0",
"should": "^13.2.3",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2"
}
}
I'd tried following things but nothing seems to be working.
Tried different versions and done npm rebuild node-sass
Cleared npm cache, removed node_modules and then npm install
I hope this will be helpful to you.
first, check version of sass & sass-loader library.
"devDependencies": {
"#vue/cli-plugin-babel": "^3.9.0",
"#vue/cli-plugin-eslint": "^3.9.0",
"#vue/cli-service": "^3.9.0",
"sass": "^1.18.0",
"sass-loader": "^7.1.0",
"deepmerge": "^4.0.0"
}
second, check your syntax loaderOptions and chainWebpack.
you have to use semicolon ; in SCSS rules
module.exports = {
css: {
loaderOptions: {
sass: {
data: `#import "~#/sass/main.scss"`,
},
},
},
chainWebpack: config => {
["vue-modules", "vue", "normal-modules", "normal"].forEach((match) => {
config.module.rule('scss').oneOf(match).use('sass-loader')
.tap(opt => Object.assign(opt, { data: `#import '~#/sass/main.scss';` }))
})
}
}

_.each throws error after npm update

Everything was running fine, before I run 'npm update' to push my code with latest libraries. Now I am getting error:
{ message: 'Method Map.prototype.has called on incompatible receiver #',
stack: 'TypeError: Method Map.prototype.has called on incompatible receiver #\n at Clone.has ()\n at get (/Users/myproject/node_modules/kareem/index.js:418:11)\n at Clone.Kareem.pre (/Users/myproject/node_modules/kareem/index.js:350:16)\n at Clone.Schema.pre (/Users/myproject/node_modules/mongoose/lib/schema.js:1135:20)\n at Schema.extend (/Users/myproject/node_modules/mongoose-schema-extend/index.js:73:15)\n at Object.createSchema (/Users/myproject/framework/nDatabase/bin/system.js:341:89)\n at /Users/myproject/framework/nDatabase/bin/system.js:384:24\n at Array.forEach ()\n at Object.resolveSchemaDependancy (/Users/myproject/framework/nDatabase/bin/system.js:356:25)\n at /Users/myproject/framework/nDatabase/bin/system.js:406:24\n at /Users/myproject/node_modules/lodash/lodash.js:4917:15\n at baseForOwn (/Users/myproject/node_modules/lodash/lodash.js:3002:24)\n at /Users/myproject/node_modules/lodash/lodash.js:4886:18\n at Function.forEach (/Users/myproject/node_modules/lodash/lodash.js:9334:14)\n at Object.traverseSchemas (/Users/myproject/framework/nDatabase/bin/system.js:401:11)\n at Object.extractRawSchema (/Users/myproject/framework/nDatabase/bin/system.js:418:40)' }
Error indicate some issues with loadash library while using:
_.each({}, (object, name) =>{
/////
});
Here is list of dependancies I am using :
"dependencies": {
"async": "^2.6.1",
"bcrypt": "^1.0.3",
"body-parser": "^1.18.3",
"chai": "^4.1.2",
"cron": "^1.3.0",
"express": "^4.16.3",
"java": "^0.9.1",
"kafka-node": "^2.6.1",
"lodash": "^4.17.10",
"mocha": "^4.1.0",
"mocha-suit": "^0.5.3",
"mongodb": "^3.1.0-beta4",
"mongoose": "^5.1.6",
"mongoose-schema-extend": "0.2.0",
"node-cache": "^4.2.0",
"recursive-copy": "^2.0.8",
"redis": "^2.8.0",
"request-promise": "^4.2.2",
"should": "^13.2.1",
"stompit": "^0.25.0",
"uuid": "^3.2.1",
"winston": "^2.4.3",
"winston-daily-rotate-file": "^3.2.1",
"winston-elasticsearch": "^0.7.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-vue": "^2.0.2",
"babel-runtime": "^6.26.0",
"css-loader": "^0.28.11",
"meow": "^5.0.0",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"style-loader": "^0.21.0",
"webpack": "^4.12.0",
"webpack-dev-middleware": "^3.1.3"
}
Please help me to resolve this Issue.

sqlite3 cannot find child_process and fs

I have a next.js application setup and I am trying to integrate sqlite3. I import it like this:
const sqlite3 = require('sqlite3').verbose();
const db = new sqlite3.Database('database.db');
However when I run my node express server, i get the following:
These dependencies were not found:
* child_process in ./node_modules/node-gyp/lib/build.js, ./node_modules/node-gyp/lib/node-gyp.js and 7 others
* fs in ./node_modules/fs.realpath/old.js, ./node_modules/fs.realpath/index.js and 35 others
To install them, you can run: npm install --save child_process fs
I have run npm install as it asks but it still asks gives me this error.
Here are my dependencies in package.json:
"dependencies": {
"autoprefixer": "7.1.5",
"aws-sdk": "^2.162.0",
"axios": "0.15.3",
"babel-cli": "^6.26.0",
"babel-plugin-inline-react-svg": "^0.4.0",
"babel-plugin-module-resolver": "^2.7.1",
"babel-plugin-wrap-in-js": "^1.1.0",
"babel-preset-es2015": "^6.24.1",
"child_process": "^1.0.2",
"cookie-parser": "^1.4.3",
"express": "^4.14.0",
"fs": "0.0.1-security",
"glob": "^7.1.2",
"jsonwebtoken": "^8.1.0",
"net": "^1.0.2",
"next": "latest",
"njwt": "^0.4.0",
"node-sass": "^4.4.0",
"normalize.css": "^7.0.0",
"postcss-easy-import": "^3.0.0",
"postcss-loader": "^2.0.7",
"prop-types": "^15.6.0",
"raw-loader": "^0.5.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"sass-loader": "^6.0.6",
"semantic-ui-react": "^0.73.0",
"sqlite3": "^3.1.13",
"superagent": "^3.4.0",
"tls": "0.0.1"
},

Resources