This error happened to me overnight. I'm no longer able to retrieve Decentraland data from the chain. I've attempted to upgrade the dependency in the web3-core-method nodemodule, but to no avail.
From my package.json:
"web3": "^1.0.0-beta.41"
Here is the full error:
Error: Cannot find module 'lodash/isString'
[0] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
[0] at Function.Module._load (internal/modules/cjs/loader.js:507:25)
[0] at Module.require (internal/modules/cjs/loader.js:637:17)
[0] at require (internal/modules/cjs/helpers.js:22:18)
[0] at Object.<anonymous> (/Users/project/node_modules/web3-core-method/dist/web3-core-method.cjs.js:12:32)
[0] at Module._compile (internal/modules/cjs/loader.js:689:30)
[0] at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
[0] at Module.load (internal/modules/cjs/loader.js:599:32)
[0] at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
[0] at Function.Module._load (internal/modules/cjs/loader.js:530:3)
[0] at Module.require (internal/modules/cjs/loader.js:637:17)
[0] at require (internal/modules/cjs/helpers.js:22:18)
[0] at Object.<anonymous> (/Users/project/node_modules/web3-eth-accounts/dist/web3-eth-accounts.cjs.js:10:22)
[0] at Module._compile (internal/modules/cjs/loader.js:689:30)
[0] at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
[0] at Module.load (internal/modules/cjs/loader.js:599:32)
NPM: 6.4.1
Node: 10.14.2
Converting OP's commented solution to an answer:
I fixed this by going into the web3-core-method package.json and adding in lodash as a dependency.
– Sm00g15 on Feb 5, 2019 at 1:56
Related
Error: Cannot find module 'gulp-cli'
Require stack:
- /usr/local/lib/node_modules/gulp/bin/gulp.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:996:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:3:1)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/local/lib/node_modules/gulp/bin/gulp.js' ]
}
Any idea of how this can be fixed?
The full error is:
SyntaxError: /root/anon/config.json: Unexpected token ]
at Object.parse (native)
at Object.Module._extensions..json (module.js:425:27)
at Module.load (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at loadJson (/root/anon/anon.coffee:63:3)
at getConfig (/root/anon/anon.coffee:51:12)
at main (/root/anon/anon.coffee:136:12)
at Object.<anonymous> (/root/anon/anon.coffee:147:3)
at Object.<anonymous> (/root/anon/anon.coffee:3:1)
at Module._compile (module.js:410:26)
at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:173:23)
at compileScript (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:224:29)
at compilePath (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:174:14)
at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:98:20)
at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/coffee:7:41)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
The code I'm working with is:
https://pastebin.com/pVYwHpLc
(Don't worry, I changed the keys.)
I'm confused what and where the error is (front end is my thing). Any help is appreciated.
Sorry to bother.
Although a bit late answer, the error is on line 12:
"204.97.104.30",
You should delete the comma character (,) to have a valid JSON
When I try to install gulp in my project repository, this message show:
Error: Cannot find module 'clone' at Function.Module._resolveFilename
(module.js:325:15) at Function.Module._load (module.js:276:25) at
Module.require (module.js:353:17) at require
(internal/module.js:12:17) at Object.
(C:\laragon\www\hms52\node_modules\laravel-elixir\node
_modules\gulp-util\node_modules\vinyl\index.js:2:13) at Module._compile (module.js:409:26) at Object.Module._extensions..js
(module.js:416:10) at Module.load (module.js:343:32) at
Function.Module._load (module.js:300:12) at Module.require
(module.js:353:17) at require (internal/module.js:12:17)
I have the below sample code which is failing if i pass ISODate in JSON object
var data =[{"$match":{"CREATED_DATE":{"$gt":ISODate("2015-07-29T17:30:00.000Z"),"$lt":ISODate("2015-07-30T09:00:00.000Z")}}}]
var update=JSON.parse(data);
Below is the error
/home/ubuntu/rr.js:1
name) { var data =[{"$match":{"EPS_TRANSACTION.CREATED_DATE":{"$gt":ISODate("2
^
ReferenceError: ISODate is not defined
at Object.<anonymous> (/home/ubuntu/rr.js:1:123)
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 Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
I am unable to handle the error,any solution will be much helpful
I use https://github.com/calzoneman/sync project and get this error. I'm new to nodejs. How to fix this?
I done all in installation manual
root#srv:/var/www/synch# node server.js
Starting CyTube v1.9.5
/var/www/synch/node_modules/mysql-libmysqlclient/lib/mysql-libmysqlclient.js:208
MysqlConnectionQueued.prototype = new bindings.MysqlConnection();
^
TypeError: Cannot read property 'MysqlConnection' of null
at Object.<anonymous> (/var/www/synch/node_modules/mysql-libmysqlclient/lib/mysql-libmysqlclient.js:208:47)
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> (/var/www/synch/auth.js:12:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)