getOptions: Cannot read property 'elm' of undefined
See original GitHub issueI’m noticing that when calling getOptions
here the check for this.options.elm
fails here. The exact error is:
Module build failed: TypeError: Cannot read property 'elm' of undefined
at Object.getOptions (./node_modules/elm-webpack-loader/index.js:37:36)
at Object.module.exports (./node_modules/elm-webpack-loader/index.js:117:28)
Changing the offending line:
var globalOptions = this.options.elm || {};
…to the following fixes things:
var globalOptions = (this.options && this.options.elm) || {};
…however after studying the code I’m looks as though this.options
will always be undefined
.
This is with Webpack 4.0.0-beta.0, however I’m also unable to get either of the examples working. Is this a patch worth submitting, or am I missing something?
The very barebones source I’ve been working with is here:
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Cannot read property 'Elm' of undefined while using Elm 0.19 ...
The issue is that 'this' is not defined in the electron renderer; This causes scope within Elm runtime to be undefined .
Read more >Uncaught TypeError: Cannot read property 'Elm' of undefined
Hello guys,. I am trying to get elm, phoenix and elixir to work together, but i keep on getting this error. "Uncaught TypeError:...
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 property childNodes of undefined, with extension ...
This error usually happens when some external JavaScript modifies DOM owned by Elm. I think this is a general problem for VirtualDOM-based rendering...
Read more >merge的搜索结果_第94页_菜鸟教程网
vue写的多页面应用,打包后访问报错:Cannot read property 'call' of undefined ... uiJqLinkingFunction(scope, elm, attrs) { function getOptions(){ var ...
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
Webpack 4.0.0 is released already. Same problem exists.
Not yet. Was planning to batch some more changes. Will release this weekend