TypeError: Cannot read property 'port' of undefined. After update to version 1.6.11
See original GitHub issueDescribe the bug Error after update to version 1.6.11
/usr/local/lib/node_modules/green-tunnel/bin/gt.js:29
default: config.port,
^
TypeError: Cannot read property 'port' of undefined
at Object.<anonymous> (/usr/local/lib/node_modules/green-tunnel/bin/gt.js:29:19)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
To Reproduce Steps to reproduce the behavior:
- From green-tunnel 1.4.0 in MacOS Catalina
- run
npm i -g green-tunnel
to upgrade version to 1.6.11 - update complete, now run
green-tunnel
- Error occurs like above
Expected behavior Running properly as usual
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: MacOS Catalina 10.15.2
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'port' of undefined · Issue #672
I have a node.js app which runs normally on my local machine and in my personal folder on Entarch as my personal account...
Read more >TypeError: Cannot read property 'PORT' of undefined at Object ...
process.environment doesn't exist, so the expression is undefined . Then, you try to access PORT of the undefined value, causing the error ...
Read more >Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >cannot read properties of undefined (reading 'data') axios
This error occurs when the Axios library is unable to find the data it is looking for. This can be caused by a...
Read more >Help test 2.3.1 RC - core - Meteor forums
First we have update to Node 14.17.2 of the July security release. ... TypeError: Cannot read property '_handleConnect' of undefined ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had same problem and it was because of a cache file
esm
module made. cache file looked like below, which exports oldgetConfig
instead ofconfig
Cleaning up npm cache would resolve this issue
or if you’re not using node 13+, installing newer version would have same effect (I had to install node 13+ to use 1.6.11 because of
export
keyword)following @pcr910303 suggestion. I tried to fix itself directly to the
/usr/local/bin/gt
file.just changed some lines
to
want to create the pull request for this, but i see the latest code in
master
branch inindex.js
file has already named properly for theconfig
variable.@SadeghHayeri