Skip to content
This repository has been archived by the owner on Jun 23, 2018. It is now read-only.

Error on cake bake #93

Open
WizzieP opened this issue Aug 13, 2015 · 1 comment
Open

Error on cake bake #93

WizzieP opened this issue Aug 13, 2015 · 1 comment

Comments

@WizzieP
Copy link

WizzieP commented Aug 13, 2015

Baking worker.
   minifying tmp/sandbox.js using java -Xmx4g -jar ./tools/closure-compiler/trunk/build/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --js 
Baking languages.
Baking the ruby interpreter.
Compiling langs/ruby/jsrepl_ruby.coffee.
/home/andrzej/projects/programuj/jsrepl/Cakefile:63
      if (!path.existsSync(current_path)) {
                ^
TypeError: undefined is not a function
  at ensurePathExists (/home/andrzej/projects/programuj/jsrepl/Cakefile:63:17)
  at buildEngine (/home/andrzej/projects/programuj/jsrepl/Cakefile:76:5)
  at buildNextLang (/home/andrzej/projects/programuj/jsrepl/Cakefile:227:22)
  at /home/andrzej/projects/programuj/jsrepl/Cakefile:232:18
  at /home/andrzej/projects/programuj/jsrepl/Cakefile:160:16
  at ChildProcess.exithandler (child_process.js:742:7)
  at ChildProcess.emit (events.js:110:17)
  at maybeClose (child_process.js:1015:16)
  at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

Node v0.12

Both Win8.1 and Linux

@elvongray
Copy link

@WizzieP: This occurs because existsSync has been depreciated. You can use these changes to get the build to work.

 #function to check if the path exist
fileExists = (filePath)->
  try
    fs.lstatSync filePath
    true
  catch err
    if err.code is 'ENOENT'
      false

# Creates any elements of the dirname of the given path that do not exist.
ensurePathExists = (the_path) ->
  parts = the_path.split('/').slice 0, -1
  current_path = '.'
  for part in parts
    current_path += '/' + part
    fs.mkdirSync(current_path, 0o755) if not fileExists current_path

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants