When I run donejs build
and then NODE_ENV=production donejs start
I get this error
Potentially unhandled rejection [2] ReferenceError: Error loading “swimming@0.0.0#index.stache!done-autorender@0.8.0#autorender” at file:…/src/index.stache
$traceurRuntime is not defined
at Function. (file:…/dist/bundles/can/util/vdom/vdom.js:28:251)
This happens on a completely new donejs app (right after running donejs add app my-app)
I got the same problem also when i try with the “Quick start: donejs-chat” example.
Potentially unhandled rejection [2] ReferenceError: Error loading "donejs-chat@0.0.0#index.stache!done-autorender@0.8.0#autorender" at file:/project/donejs-chat/donejs-chat/src/index.stache
$traceurRuntime is not defined
at Function.<anonymous> (evalmachine.<anonymous>:28:251)
at Function.<anonymous> (evalmachine.<anonymous>:28:251)
at define.execute (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:1416:32)
at linkDynamicModule (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:668:32)
at linkDynamicModule (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:662:11)
at linkDynamicModule (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:662:11)
at linkDynamicModule (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:662:11)
at linkDynamicModule (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:662:11)
at linkDynamicModule (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:662:11)
at linkDynamicModule (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:662:11)
at linkDynamicModule (/project/donejs-chat/donejs-chat/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:662:11)
I checked if there could be some conflict due to previous installed library: I created a new VM with a dedicated environment for DoneJS, with npm 2.15.9 and node v4.6.1.
The problem still remains: it seems that the global variable $traceurRuntime is not seen due to the change of environment (NODE_ENV=production).
Since I don’t see traceur/traceur-runtime package inside the node_modules dir I tried to force it adding the dependency in packet.json (dependencies object) and I installed them directly but without results
Hey @fp_dev, sorry for taking so long to respond. That definitely sounds like a bug to me. steal-tools is supposed to automatically add the traceurRuntime if it detects that it’s needed. We have tests for this.
I tried again and the building process works correctly.
I create the project from the beginning, downloading the app template from scratch because i saw that in the meanwhile there have been some version updates.