Node.js returns self is not defined
Open
Nobody has claimed this yet.
bug
P2
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
When initializing the library in Node.js (v. 19)
var p = require("plotly.js-dist")
I get an error with the message: "self is not defined"
.. /node_modules/plotly.js-dist/plotly.js:16
})(self, function() {
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with require("plotly.js-dist") in Node.js v19 and inspect node_modules/plotly.js-dist/plotly.js, especially the self reference shown at line 16. Determine why the distributed package cannot initialize in Node.js; done means the same require call no longer fails with "self is not defined".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100