PencilCode / pencilcode

An online IDE for kids: pencilcode.net.
http://dev.pencilcode.net/
MIT License
167 stars 100 forks source link

Error while running grunt #252

Open alejandroai opened 3 years ago

alejandroai commented 3 years ago

Hi there,

I get this error when trying to run grunt in the installation.

Running "browserify:dist" (browserify) task

>> Bundle content/editor.js created.

Running "uglify:all" (uglify) task
{ SyntaxError: Unexpected token: name «ArraySet», expected: punc «;»
    at JS_Parse_Error.get (eval at <anonymous> (/home/alejandro/materia/pencilcode/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:71:23)
    at formatError (internal/util/inspect.js:818:16)
    at formatRaw (internal/util/inspect.js:617:14)
    at formatValue (internal/util/inspect.js:509:10)
    at inspect (internal/util/inspect.js:189:10)
    at Object.formatWithOptions (util.js:84:12)
    at Console.(anonymous function) (console.js:198:15)
    at Console.log (console.js:209:31)
    at /home/alejandro/materia/pencilcode/node_modules/grunt-contrib-uglify/tasks/uglify.js:144:17
    at Array.forEach (<anonymous>)
  message: 'Unexpected token: name «ArraySet», expected: punc «;»',
  filename: 'editor.js',
  line: 131461,
  col: 6,
  pos: 4812684 }
>> Uglifying source content/editor.js failed.
Warning: Uglification failed.
Unexpected token: name «ArraySet», expected: punc «;». 
Line 131461 in content/editor.js
 Use --force to continue.

Aborted due to warnings.

if it helps, this is my setup: npm v6.14.6 nodejs v10.22.1 grunt-cli v1.3.2 grunt v1.3.0

Thanks!

alejandroai commented 3 years ago

If someone needit, to make it work for now, I edited the file "Grountfile.js" to take out the Uglify from the build. Change line 348 ['browserify:dist', 'uglify', 'less', 'builddate']); To this: ['browserify:dist', 'less', 'builddate']);

But obviously the code now its a little bigger.