I am running into an issue where there is an error in my app and all Node tells me is a line number from the dist copy of the app.
TypeError: Cannot convert undefined or null to object
at keys (<anonymous>)
at /Users/MyApp/dist/server.js:346:31
at Array.forEach (<anonymous>)
at /Users/MyApp/dist/server.js:336:46
at Generator.next (<anonymous>)
at step (/Users/MyApp/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/MyApp/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
at process._tickCallback (internal/process/next_tick.js:68:7)
so how do I know the actual line number and filename where the error was generated instead of pointing me to the dist version of the server.js file which is not very useful. I have a file called process.js and I am sure this is where the error is being generated but the logs don't tell me anything about this file.
Related
I'm new to nextJS and typescript. I'm trying to create simple blog with nextJS/typescript and sanity CMS backend. When I run dev, it successfully compiles but then I get the following Unhandled Runtime Error Error.
OS: MacOS monterey(M1)
Node: v18.12.1
NextJS: 12.3
typescript: 4.8
Unhandled Runtime Error
Error: [object ProgressEvent]
Call Stack
Object.getProperError
node_modules/next/dist/lib/is-error.js (25:0)
Object.eval
node_modules/next/dist/client/index.js (574:39)
step
node_modules/tslib/tslib.es6.js (102:0)
Object.eval [as next]
node_modules/tslib/tslib.es6.js (83:45)
asyncGeneratorStep
node_modules/#swc/helpers/lib/_async_to_generator.js (23:0)
_next
node_modules/#swc/helpers/lib/_async_to_generator.js (12:0)
I've tried deleting/re-installing node_modules and package.json and that didn't work. Not sure if it's a dependency problem. Could it be that the _async_to_generator.js file is not handling an async function/promise? Do I need to change SWC back to babel complier. Any ideas? anyone had this issue?
I just wanted to add linting to my project. Here is what it did:
nx g #nrwl/angular:application fuzzy
And then tried to lint it
> ng lint
Unexpected error:
TypeError: context.hasher.hashTask is not a function
at A:\web-app\node_modules\#nrwl\linter\src\executors\eslint\hasher.js:6:42
at Generator.next (<anonymous>)
at A:\web-app\node_modules\tslib\tslib.js:118:75
at new Promise (<anonymous>)
at Object.__awaiter (A:\web-app\node_modules\tslib\tslib.js:114:16)
at run (A:\web-app\node_modules\#nrwl\linter\src\executors\eslint\hasher.js:5:20)
at TasksSchedule.<anonymous> (A:\web-app\node_modules\nx\src\tasks-runner\tasks-schedule.js:117:19)
at Generator.next (<anonymous>)
at A:\web-app\node_modules\tslib\tslib.js:118:75
at new Promise (<anonymous>)
I use a NX Monorepo with Angular 13 and NestJS.
The documentation about the context.hasher? is also not helpful.
My workspace is about 3 years old and something about nx is broken in my workspace, but as i have currently no clue, why this error occurs, any help is appreciated.
I have installed all prerequisites for setting up the hyperledger Explorer but when I start it, I got the following error in log file:
postgres://hppoc:password#127.0.0.1/fabricexplorer
fs.js:675
return binding.read(fd, buffer, offset, length, position);
^
Error: EISDIR: illegal operation on a directory, read
at Object.fs.readSync (fs.js:675:18)
at tryReadSync (fs.js:540:20)
at Object.fs.readFileSync (fs.js:583:19)
at configuration.getPeersByOrg.forEach.key (/home/ubuntu/blockchain-explorer/app/FabricClientProxy.js:164:20)
at Array.forEach (<anonymous>)
at FabricClientProxy.setupPeers (/home/ubuntu/blockchain-explorer/app/FabricClientProxy.js:161:36)
at configuration.getOrgs.forEach.key (/home/ubuntu/blockchain-explorer/app/FabricClientProxy.js:155:10)
at Array.forEach (<anonymous>)
at FabricClientProxy.createDefault (/home/ubuntu/blockchain-explorer/app/FabricClientProxy.js:137:27)
at new FabricClientProxy (/home/ubuntu/blockchain-explorer/app/FabricClientProxy.js:32:8)
As the error suggests, you have specified a directory instead of a file on which read operation is happening, I think somewhere in the config.json file you have given an incorrect path. Please check or post the config.json file so the issue can be identified.
I an new to Meteor framework and trying to setup Meteor project in my local system and its showing below error. I tried googling but didnt find the solution.
/Users/progeshsubba/.meteor/packages/meteor-tool/.1.4.4_1.zu6xaw.bnn3++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
throw(ex);
^
TypeError: Cannot read property 'stripe' of undefined
at meteorInstall.server.methods.plans.methods.js (server/methods/plans/methods.js:3:32)
at fileEvaluate (packages/modules-runtime.js:197:9)
at require (packages/modules-runtime.js:120:16)
at /Users/progeshsubba/Desktop/surveyand/.meteor/local/build/programs/server/app/app.js:2672:1
at /Users/progeshsubba/Desktop/surveyand/.meteor/local/build/programs/server/boot.js:303:34
at Array.forEach (native)
at Function._.each._.forEach (/Users/progeshsubba/.meteor/packages/meteor-tool/.1.4.4_1.zu6xaw.bnn3++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /Users/progeshsubba/Desktop/surveyand/.meteor/local/build/programs/server/boot.js:128:5
at /Users/progeshsubba/Desktop/surveyand/.meteor/local/build/programs/server/boot.js:352:5
at Function.run (/Users/progeshsubba/Desktop/surveyand/.meteor/local/build/programs/server/profile.js:510:12)
at /Users/progeshsubba/Desktop/surveyand/.meteor/local/build/programs/server/boot.js:351:11
I'm trying to run the npm run dev command, but I'm getting this message:
ERROR Failed to compile with 2 errors 21:31:43
Module build failed: TypeError: loader.charAt is not a function
at ensureBang (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:180:16)
at getLoaderString (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:145:18)
at getRequireString (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:80:7)
at getRequire (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:71:7)
at D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:205:11
at Array.forEach (<anonymous>)
at Object.module.exports (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:198:18)
Module build failed: TypeError: loader.charAt is not a function
at ensureBang (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:180:16)
at getLoaderString (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:145:18)
at getRequireString (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:80:7)
at getRequire (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:71:7)
at D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:205:11
at Array.forEach (<anonymous>)
at Object.module.exports (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:198:18)
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
This problem appeared when I tried to reinstall all the modules. Anything, my project is on Github. Follow the repository link https://github.com/iagofrota/todo-list.