New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Underscore not available #669
Labels
Comments
caseycesari
added a commit
that referenced
this issue
Dec 8, 2017
Import underscore locally and add it to the Use config so that plugins can reference it. Plugins that don't directly import underscore reference it through Use, but it is properly made available through that interface. Because of that, require.js tries to find it in the ESRI/DOJO package and can't, which causes underscore to be undefined. Refs #1043, #669
caseycesari
added a commit
to CoastalResilienceNetwork/regional-planning
that referenced
this issue
Dec 13, 2017
Issues referencing underscore in plugins was remedied in CoastalResilienceNetwork/GeositeFramework#669. Local imports of underscore are no longer needed.
caseycesari
added a commit
that referenced
this issue
Jan 4, 2018
Adjust the use config to support all of the various ways that underscore is imported within plugins. The previous fix implemented in #1044 caused problems with plugins that bring in their own version of underscore in via a CDN. The adjustments here should make that possible while still allowing plugins to import underscore via Use.js. Also, rename the framework version of underscore to reduce confusion. Refs #669, #1043, #1046
caseycesari
added a commit
that referenced
this issue
Jan 4, 2018
Adjust the use config to support all of the various ways that underscore is imported within plugins. The previous fix implemented in #1044 caused problems with plugins that bring in their own version of underscore in via a CDN. The adjustments here should make that possible while still allowing plugins to import underscore via Use.js. Also, rename the framework version of underscore to reduce confusion. Refs #669, #1043, #1046
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have two reports of the underscore library not resolving to an object and throwing errors when functions are accessed in plugin startup scripts:
Regional Planning
main.js:66 Uncaught TypeError: _.isUndefined is not a function
Inspecting the
_
variable in thedeclare
function shows that_
is equal to the number3
, which happens to be the last character in therequire:packages:location
property (//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3
)The problem was also reported from an app developer, and may indicate the error is not related to Regional Planning:
The text was updated successfully, but these errors were encountered: