Node SDK: Options variable is not a valid object
See original GitHub issuethrow new Error(‘warning, your options variable is not a valid object.’)
The error points to this:
import nodeMailjet from "node-mailjet"
const mailjet = nodeMailjet.connect(process.env.MAILJET_API_KEY, process.env.MAILJET_API_SECRET)
The env keys are correct and I am not even passing options object. It’s a typescript project.
It does run on Ubuntu (Node 12)
but this error occurs on Windows (Node 14)
.
SDK Version: v3.3.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Invalid options object. Dev Server has been initialized using ...
Here is a workaround. Delete "proxy": "http://localhost:6000". Install package http-proxy-middleware with command npm install ...
Read more >Errors | Node.js v19.3.0 Documentation
Indicates that a program is not valid JavaScript. These errors may only be generated and propagated as a result of code evaluation.
Read more >Optional chaining (?.) - JavaScript - MDN Web Docs - Mozilla
operator accesses an object's property or calls a function. ... Optional chaining not valid on the left-hand side of an assignment.
Read more >session - Amazon Web Services - Go SDK
Sessions options from Shared Config. By default NewSession will only load credentials from the shared credentials file (~/.aws/credentials). If the ...
Read more >Using the Node.js Driver - Snowflake Documentation
If the specified object does not exist, a default is not set during connection. After connecting, all of the optional connection options can...
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
@flo-sch it’s hard to reproduce the issue. Later I had switched back to Ubuntu. I don’t have the full stack trace but here’s snap. Then I went through the source code and found that here.
Apparently, clearing cache and a clean install of node modules helped. Though I can confirm the versions were same.
This issue will be closed