I spent quite a bit of time last night trying to solve the following error:
TypeError: Error loading "can@2.3.24#Map/Map" at file:C:/development.research/donejs/my-app/node_modules/can/Map/Map.js
Error loading "can@2.3.24#Map/Map" from "my-app@0.0.0#index.stache!done-autorender@0.8.0#autorender" at file:C:/development.research/donejs/my-app/src/index.stache
Cannot read property 'List' of undefined
at Function.can.Map.can.Construct.extend.setup (file:C:/development.research/donejs/my-app/node_modules/can/Map/Map.js:89:21)
at Function.can.extend.extend [as extend] (file:C:/development.research/donejs/my-app/node_modules/can/construct/construct.js:598:30)
at file:C:/development.research/donejs/my-app/node_modules/can/Map/Map.js:24:36
at stealInstantiateResult.execute (C:\development.research\donejs\my-app\node_modules\steal\main.js:1270:32)
at linkDynamicModule (C:\development.research\donejs\my-app\node_modules\steal-systemjs\dist\system.src.js:668:32)
at link (C:\development.research\donejs\my-app\node_modules\steal-systemjs\dist\system.src.js:528:11)
at Object.execute (C:\development.research\donejs\my-app\node_modules\steal-systemjs\dist\system.src.js:847:11)
at doDynamicExecute (C:\development.research\donejs\my-app\node_modules\steal-es6-module-loader\dist\es6-module-loader.src.js:1950:25)
at link (C:\development.research\donejs\my-app\node_modules\steal-es6-module-loader\dist\es6-module-loader.src.js:1998:24)
at doLink (C:\development.research\donejs\my-app\node_modules\steal-es6-module-loader\dist\es6-module-loader.src.js:1772:7)
It turned out that my import statement had the incorrect casing:
import Map from "can/Map/";
It should’ve been:
import Map from "can/map/";
Is there perhaps any way that this can be made more apparent? Given enough experience I guess one would come to learn about these but as a newcomer it caught me quite easily.