Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in mkdir "Unexpected Token" in 1.7.5 #144

Closed
craigatproperly opened this issue Jul 3, 2020 · 1 comment
Closed

Error in mkdir "Unexpected Token" in 1.7.5 #144

craigatproperly opened this issue Jul 3, 2020 · 1 comment

Comments

@craigatproperly
Copy link

Error during plugin loading (fs-extra mkdir call). This occured during deployment from within a travis docker container. Reverting to 1.7.4 resolved it. 1.7.5 in MacOS (local dev environment) worked

dpl.1
Installing deploy dependencies
dpl.2
Preparing deploy
dpl.3
Deploying application
./node_modules/serverless/bin/serverless deploy --stage staging
Serverless: Deprecation Notice: bin/serverless is deprecated, use bin/serverless.js instead
            More Info: https://www.serverless.com/framework/docs/deprecations/#BIN_SERVERLESS
 
  Syntax Error -------------------------------------------
 
  SyntaxError: Unexpected token {
  /home/travis/build/GoProperly/community-information/community/node_modules/serverless-wsgi/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
        } catch {
                ^
  
  SyntaxError: Unexpected token {
      at createScript (vm.js:80:10)
      at Object.runInThisContext (vm.js:139:10)
      at Module._compile (module.js:617:28)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at Object.<anonymous> (/home/travis/build/GoProperly/community-information/community/node_modules/serverless-wsgi/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at Object.<anonymous> (/home/travis/build/GoProperly/community-information/community/node_modules/serverless-wsgi/node_modules/fs-extra/lib/copy-sync/copy-sync.js:5:20)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at Object.<anonymous> (/home/travis/build/GoProperly/community-information/community/node_modules/serverless-wsgi/node_modules/fs-extra/lib/copy-sync/index.js:4:13)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at Object.<anonymous> (/home/travis/build/GoProperly/community-information/community/node_modules/serverless-wsgi/node_modules/fs-extra/lib/index.js:7:6)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at Object.<anonymous> (/home/travis/build/GoProperly/community-information/community/node_modules/serverless-wsgi/index.js:6:36)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at requireServicePlugin (/home/travis/build/GoProperly/community-information/community/node_modules/serverless/lib/classes/PluginManager.js:26:10)
      at pluginsObject.modules.filter.map.name (/home/travis/build/GoProperly/community-information/community/node_modules/serverless/lib/classes/PluginManager.js:126:20)
      at Array.map (<anonymous>)
      at PluginManager.resolveServicePlugins (/home/travis/build/GoProperly/community-information/community/node_modules/serverless/lib/classes/PluginManager.js:123:8)
      at PluginManager.loadAllPlugins (/home/travis/build/GoProperly/community-information/community/node_modules/serverless/lib/classes/PluginManager.js:110:15)
      at pluginManager.loadConfigFile.then.then (/home/travis/build/GoProperly/community-information/community/node_modules/serverless/lib/Serverless.js:96:35)
      at tryCatcher (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromise0 (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:729:18)
      at Promise._fulfill (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:673:18)
      at Promise._resolveCallback (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:466:57)
      at Promise._settlePromiseFromHandler (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:559:17)
      at Promise._settlePromise (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromise0 (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:729:18)
      at Promise._fulfill (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:673:18)
      at PromiseArray._resolve (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise_array.js:127:19)
      at PromiseArray._promiseFulfilled (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise_array.js:145:14)
      at Promise._settlePromise (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:609:26)
      at Promise._settlePromise0 (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:729:18)
      at Promise._fulfill (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:673:18)
      at Promise._resolveCallback (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:466:57)
      at Promise._settlePromiseFromHandler (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:559:17)
      at Promise._settlePromise (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromise0 (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:729:18)
      at Promise._fulfill (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:673:18)
      at PropertiesPromiseArray.PromiseArray._resolve (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise_array.js:127:19)
      at PropertiesPromiseArray._promiseFulfilled (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/props.js:78:14)
      at Promise._settlePromise (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:609:26)
      at Promise._settlePromise0 (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/promise.js:729:18)
      at _drainQueueStep (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/async.js:93:12)
      at _drainQueue (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues (/home/travis/build/GoProperly/community-information/community/node_modules/bluebird/js/release/async.js:15:14)
      at runCallback (timers.js:810:20)
      at tryOnImmediate (timers.js:768:5)
      at processImmediate [as _immediateCallback] (timers.js:745:5)
  From previous event:
      at Serverless.init (/home/travis/build/GoProperly/community-information/community/node_modules/serverless/lib/Serverless.js:94:8)
      at Object.<anonymous> (/home/travis/build/GoProperly/community-information/community/node_modules/serverless/bin/serverless.js:79:4)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at Object.<anonymous> (/home/travis/build/GoProperly/community-information/community/node_modules/serverless/bin/serverless:14:1)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)
      at Function.Module.runMain (module.js:694:10)
      at startup (bootstrap_node.js:204:16)
      at bootstrap_node.js:625:3
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              8.12.0
     Framework Version:         1.74.1
     Plugin Version:            3.6.15
     SDK Version:               2.3.1
     Components Version:        2.31.10

from package.json, working config:

  "devDependencies": {
    "serverless": "^1.74.1",
    "serverless-plugin-tracing": "^2.0.0",
    "serverless-python-requirements": "^5.1.0",
    "serverless-wsgi": "1.7.4"
  }

failing in linux (travis docker) config (worked in macos):


  "devDependencies": {
    "serverless": "^1.74.1",
    "serverless-plugin-tracing": "^2.0.0",
    "serverless-python-requirements": "^5.1.0",
    "serverless-wsgi": "^1.7.5"
  }
@doi-t
Copy link

doi-t commented Sep 3, 2020

I got the exact same error on circleci and reverting to 1.7.4 resolved it

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

Successfully merging a pull request may close this issue.

2 participants