You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
requirejs=require'requirejs'cb= (s) -> (result) ->console.log s, result
requirejs ['no_such_module'], cb('success 1'), cb('error 1')
requirejs ['no_such_module'], cb('success 2'), cb('error 2')
The first errback is called, then both success callbacks:
error 1 { [Error: Tried loading "no_such_module" at /Users/ryan/no_such_module.js then tried node's require("no_such_module") and it failed with error: Error: Cannot find module 'no_such_module']
originalError: { [Error: Cannot find module 'no_such_module'] code: 'MODULE_NOT_FOUND' },
moduleName: 'no_such_module',
requireModules: [ 'no_such_module' ] }
success 1 undefined
success 2 undefined
This example works in 2.1.8.
It seems the handling of nested require errors changed between 2.1.8 and 2.1.9, although both were broken: 2.1.8 would call the first errback and nothing else, while 2.1.9 has the same behavior as above.
The text was updated successfully, but these errors were encountered:
Using requirejs 2.1.9 in node:
The first errback is called, then both success callbacks:
This example works in 2.1.8.
It seems the handling of nested require errors changed between 2.1.8 and 2.1.9, although both were broken: 2.1.8 would call the first errback and nothing else, while 2.1.9 has the same behavior as above.
The text was updated successfully, but these errors were encountered: