I have been using config module for half a year in various scripts for almost a year. Now all of a sudden config is throwing an error complaining that I don't have a method watchForConfigFileChanges(); Does anyone know anything about this or how to fix this? I am using node v0.10.31 and the most recent version of config from npm. Am I supposed to add this method somewhere? I am lost. Below is the terminal output:
isaacs-air:NU isaacflaum$ node bin/test.js
/Users/isaacflaum/Code/Forensiq/NU/node_modules/config/lib/config.js:1185
global.NODE_CONFIG.watchForConfigFileChanges();
^
TypeError: Object {
"reportingDb": {
"user" : "isaac",
"password" : "whatIfThisIsActuallyMyPassword?"
},
"bingAPI": {
"user" : "user",
"password" : ""
}
}
has no method 'watchForConfigFileChanges'
at Object.<anonymous> (/Users/isaacflaum/Code/Forensiq/NU/node_modules/config/lib/config.js:1185:20)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/isaacflaum/Code/Forensiq/NU/bin/test.js:17:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
Related
this is the response i got when i run node file
`node:internal/modules/cjs/loader:1210
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /lib64/libc.so.6: version GLIBC_2.25' not found (required by /home/mhmd8/nodevenv/dad.online/16/lib/node_modules/argon2/lib/binding/napi-v3/argon2.node) at Object.Module._extensions..node (node:internal/modules/cjs/loader:1210:18) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) at Module.require (node:internal/modules/cjs/loader:1028:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/home/muhamad8/nodevenv/resumeku.online/16/lib/node_modules/argon2/argon2.js:9:25) at Module._compile (node:internal/modules/cjs/loader:1126:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) { code: 'ERR_DLOPEN_FAILED' }
how i can solve this problem, thanks!
Error: Cannot find module 'react-dev-utils/WatchMissingNodeModulesPlugin'
Require stack:
- C:\Users\stromboli\IdeaProjects\projects-ui\config\webpack.config.js
- C:\Users\stromboli\IdeaProjects\projects-ui\scripts\start.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1014:15)
at Function.Module._load (internal/modules/cjs/loader.js:884:27)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\stromboli\IdeaProjects\projects-ui\config\webpack.config.js:18:39)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\stromboli\IdeaProjects\projects-ui\scripts\start.js:32:23)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\stromboli\\IdeaProjects\\projects-ui\\config\\webpack.config.js',
'C:\\Users\\stromboli\\IdeaProjects\\projects-ui\\scripts\\start.js'
]
}
No matter what I do localhost won't open and I get this error. The github solutions shown didn't work either, how can I fix it I'm about to go crazy.
npm ls react-dev-utils
`-- react-dev-utils#12.0.1
In your config find webpack.config.dev.js and remove the following:
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
module.exports = {
// ...
plugins: [
// If you require a missing module and then `npm install` it, you still have
// to restart the development server for Webpack to discover it. This plugin
// makes the discovery automatic so you don't have to restart.
// See https://github.com/facebook/create-react-app/issues/186
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
]
}
this is the error i get after running npm start
> tictactoe#0.1.0 start
> parcel index.html
D:\courses\TicTacToe\node_modules\bindings\bindings.js:126
err = new Error(
^
Error: Could not locate the bindings file. Tried:
→ D:\courses\TicTacToe\node_modules\deasync\lib\binding\node-v93-win32-x64\deasync.node
at bindings (D:\courses\TicTacToe\node_modules\bindings\bindings.js:126:9)
at Object.<anonymous> (D:\courses\\TicTacToe\node_modules\deasync\index.js:30:31)
at Module._compile (D:\courses\TicTacToe\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (D:\courses\TicTacToe\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.<anonymous> (D:\courses\TicTacToe\node_modules\parcel\src\utils\syncPromise.js:1:79)
at Module._compile (D:\courses\TicTacToe\node_modules\v8-compile-cache\v8-compile-cache.js:192:30) {
I tried installed npm again, but same error.
I was workign on a Node App a few weeks ago which worked fine. I went to restart it today and its throwing this error
var mongooseUri = uriUtil.formatMongoose(mongodbUri);
^
ReferenceError: uriUtil is not defined
at Object.<anonymous> (d:\A\B\C\Web Applications\Donations1\routes\donations.js:14:19)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (d:\A\B\C\Web Applications\Donations1\app.js:9:17)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:139:18)
at node.js:999:3
It relates to this line of code that connects to mongodb
var mongodbUri = 'mongodb://AAA:BBB#ds053305.mongolab.com:12345/donations';
var mongooseUri = uriUtil.formatMongoose(mongodbUri);
You can replace this line:
var mongooseUri = uriUtil.formatMongoose(mongodbUri);
Which this line:
var mongooseUri =require('mongodb-uri').formatMongoose(mongodbUri);
Don't worry to require same module more than once. Node always require only one time, and after that use the cache for loading the module.
Im getting the following error and I can't figure out through the stack trace where it's erroring.
/Users/rahulsharma/Desktop/Jobletics/node_modules/sequelize/lib/sequelize.js:298
this.importCache[path] = defineCall(this, DataTypes)
^
TypeError: object is not a function
at module.exports.Sequelize.import (/Users/ra/Desktop/Js/node_modules/sequelize/lib/sequelize.js:298:32)
at db.sequelize (/Users/ra/Desktop/Js/models/index.js:14:33)
at Array.forEach (native)
at Object.<anonymous> (/Users/ra/Desktop/Js/models/index.js:13:4)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
Here is the git:
https://github.com/rahul1346/jb
Any idea?
business_model.js is an empty file.