Picture of Shaun Q
Preview of course not working CMD error message
by Shaun Q - Thursday, 18 May 2017, 4:14 AM
 

good day all,

my Adapt Authoring tool has been functioning optimally for some time now. i did recently delete the node modules in the framework folder and run an npm install. Subsequent to that i have been having an issue with the Spoor (2.0.10) and resources (2.0.5) plugins, if i add anyone of these or both to a course i get an error in the AT saying that the preview could not be generated and that i should contact the admin...

The CMD error is as follows:

C:\adapt_authoring>node server
info: [18 May 2017 06:01:57 +02:00] configuration loaded from C:\adapt_authoring
\conf\config.json
info: [18 May 2017 06:01:58 +02:00] Supporting the following authentication type
s:
info: [18 May 2017 06:01:58 +02:00] - local
info: [18 May 2017 06:02:02 +02:00] You are currently running Adapt authoring to
ol v0.2.2 - v0.3.0 is now available
info: [18 May 2017 06:02:02 +02:00] The Adapt Framework being used is v2.0.7 - v
2.0.19 is now available
info: [18 May 2017 06:02:02 +02:00] Run "node upgrade.js" to update to the lates
t version
info: [18 May 2017 06:02:03 +02:00] Connection established: adapt-tenant-master
info: [18 May 2017 06:02:05 +02:00] Server started listening on port 5000
info: [18 May 2017 06:02:19 +02:00] Connection established: adapt-tenant-master
info: [18 May 2017 06:02:29 +02:00] Retrieving JSON
info: [18 May 2017 06:02:29 +02:00] All assets processed
info: [18 May 2017 06:02:29 +02:00] 3.1. Ensuring framework build exists
info: [18 May 2017 06:02:29 +02:00] 3.2. Using theme: adapt-contrib-vanilla
info: [18 May 2017 06:02:29 +02:00] 3.3. Using menu: adapt-contrib-boxMenu
info: [18 May 2017 06:02:29 +02:00] grunt server-build:prod --outputdir=courses\
577a556f234ca0ec3cae87f1\591d1854efd4d39c1a1e0977\build --theme=adapt-contrib-va
nilla --menu=adapt-contrib-boxMenu
error: [18 May 2017 06:02:40 +02:00] exec error: Error: Command failed: C:\Windo
ws\system32\cmd.exe /s /c "grunt server-build:prod --outputdir=courses\577a556f2
34ca0ec3cae87f1\591d1854efd4d39c1a1e0977\build --theme=adapt-contrib-vanilla --m
enu=adapt-contrib-boxMenu"

error: [18 May 2017 06:02:40 +02:00] stdout error: Running "server-build:prod" (
server-build) task

Running "_log-vars" task
The following will be included in the build:
- adapt-contrib-vanilla
- adapt-contrib-boxMenu
- adapt-contrib-spoor
- adapt-contrib-text

>> Using source at "C:\adapt_authoring\temp\adapt_framework\src\"
>> Building to "courses\577a556f234ca0ec3cae87f1\591d1854efd4d39c1a1e0977\build\
"
>> Using theme "adapt-contrib-vanilla"
>> Using menu "adapt-contrib-boxMenu"

Running "copy:index" (copy) task
Copied 1 file

Running "copy:courseAssets" (copy) task


Running "copy:courseJson" (copy) task


Running "copy:componentAssets" (copy) task


Running "copy:componentFonts" (copy) task


Running "copy:extensionAssets" (copy) task


Running "copy:extensionFonts" (copy) task


Running "copy:menuAssets" (copy) task


Running "copy:menuFonts" (copy) task


Running "copy:themeAssets" (copy) task
Created 1 directories, copied 4 files

Running "copy:themeFonts" (copy) task
Created 1 directories, copied 5 files

Running "copy:main" (copy) task
Copied 18 files

Running "less:compile" (less) task

Running "handlebars:compile" (handlebars) task
>> 1 file created.

Running "javascript:compile" (javascript) task
Fatal error: Error: Module loading did not complete for: core/js/app, plugins, e
xtensions/adapt-contrib-spoor/js/adapt-contrib-spoor, core/js/adapt, extensions/
adapt-contrib-spoor/js/adapt-stateful-session, extensions/adapt-contrib-spoor/js
/serializers/default, extensions/adapt-contrib-spoor/js/serializers/questions, e
xtensions/adapt-contrib-spoor/js/adapt-offlineStorage-scorm, core/js/offlineStor
age
The following modules share the same URL. This could be a misconfiguration if th
at URL only has one anonymous module in it:
C:/adapt_authoring/temp/adapt_framework/src/core/js/adapt.js: core/js/adapt, cor
eJS/adapt
C:/adapt_authoring/temp/adapt_framework/src/core/js/offlineStorage.js: core/js/o
fflineStorage, coreJS/offlineStorage
at Function.build.checkForErrors (C:\adapt_authoring\temp\adapt_framework\no
de_modules\requirejs\bin\r.js:28204:19)

 

Execution Time (2017-05-18 06:02:32 UTC+2)
loading tasks 918ms █████ 12%
loading grunt-contrib-copy 172ms █ 2%
copy:componentAssets 864ms ████ 11%
copy:componentFonts 117ms █ 2%
copy:extensionAssets 1.2s ██████ 16%
copy:extensionFonts 122ms █ 2%
copy:themeFonts 82ms █ 1%
copy:main 332ms ██ 4%
less:compile 2.1s ██████████ 28%
handlebars:compile 694ms ████ 9%
javascript:compile 773ms ████ 10%
Total 7.6s


error: [18 May 2017 06:02:40 +02:00] Error: Command failed: C:\Windows\system32\
cmd.exe /s /c "grunt server-build:prod --outputdir=courses\577a556f234ca0ec3cae8
7f1\591d1854efd4d39c1a1e0977\build --theme=adapt-contrib-vanilla --menu=adapt-co
ntrib-boxMenu"

error: [18 May 2017 06:02:40 +02:00] Error: Command failed: C:\Windows\system32\
cmd.exe /s /c "grunt server-build:prod --outputdir=courses\577a556f234ca0ec3cae8
7f1\591d1854efd4d39c1a1e0977\build --theme=adapt-contrib-vanilla --menu=adapt-co
ntrib-boxMenu"

 

 

any idea what the issue is and how it can be resolved?

Picture of paul diaper
Re: Preview of course not working CMD error message
by paul diaper - Monday, 10 September 2018, 2:54 PM
 

I'm getting this problem.
Has it been resolved??

Picture of paul diaper
Re: Preview of course not working CMD error message
by paul diaper - Tuesday, 11 September 2018, 1:08 PM
 

This has been fixed in my installation now.

Whilst getting ffmpeg working, the re-installing of Node, Grunt and Adapt and making sure the versions were upto date, the errors went away and I can now install themes and plugins.

The preview also works as a result of the above.

Picture of Daniel Seixas
Re: Preview of course not working CMD error message
by Daniel Seixas - Wednesday, 12 September 2018, 3:58 PM
 

FWIW,

When we get this kind of errors we usually do the following:

  • pm2 stop server ; grunt build ; pm2 start server
  • Change and save course theme to another then change and save course theme to original.
  • Change and save course menu to another then change and save course menu to original.

 If none of this works, I usually end by removing the components from mongo and then reinstally them manually.

Picture of Sebastin Francis
Re: Preview of course not working CMD error message
by Sebastin Francis - Tuesday, 25 September 2018, 10:18 PM
 

Hi Daniel,

I'm an Instructional Designer, but a newbie to any coding/troubleshooting in terminal etc. I tried the following:

  • Installed pm2
  • When I received the preview error, tried "pm2 stop server", but got a "Process server not found" error.
  • I also tried saving to a different them, then revert to the vanilla theme
  • I could not save to a different menu as I had trouble installing anything other than the boxMenu

Would you happen to have any other pointers for me please? Or, if you could provide a more detailed steps ("for dummies!") for the first bullet point in your post, that would be awesome!

I would LOVE to get Adapt to work me as it would be a perfect tool for some of our mobile/microlearning lessons. I spent hours and days troubleshooting all the installation issues and got it working, only to get stuck at this preview error for the past couple of weeks! :(

@Paul,

I tried your fix (ensuring ffmpeg was working, then re-installed node, npm, grunt, adapt authoring tool) and ensured to update them, but no luck!

Thanks in advance for your help!

Sebastin