Giter Club home page Giter Club logo

Comments (7)

DylanAllen avatar DylanAllen commented on May 29, 2024

I found the bug that is causing this, and pushed updates to the master branch to fix. Pull those updates down, and then you can re-run sls deploy --stage dev again or you can run the following commands to avoid an entire re-deploy:

sls postDeployActions --stage dev
sls buildNuxtApp --stage dev

The first command should complete pretty quickly, the second command will build the Nuxt app and re-deploy to the lambda function.

from noiiice.

airpaio avatar airpaio commented on May 29, 2024

Got a little farther this time. Now it breaks with a credentials error when running
sls buildNuxtApp --stage dev

I did try aws s3 cp filename s3://mediabucketname and it worked fine, so I'm assuming I have my credentials set up correctly. They are in .aws/credentials.

Serverless: Building and deploying Noiiice ...
Apps Found:  [ 'apps/app' ]

  Credentials Error --------------------------------------

  CredentialsError: Missing credentials in config
      at RemoteCredentials.getECSFullUri (E:\airpa\noiiice\node_modules\aws-sdk\lib\credentials\remote_credentials.js:99:11)
      at RemoteCredentials.load (E:\airpa\noiiice\node_modules\aws-sdk\lib\credentials\remote_credentials.js:183:22)
      at RemoteCredentials.coalesceRefresh (E:\airpa\noiiice\node_modules\aws-sdk\lib\credentials.js:205:12)
      at RemoteCredentials.refresh (E:\airpa\noiiice\node_modules\aws-sdk\lib\credentials\remote_credentials.js:172:10)
      at RemoteCredentials.get (E:\airpa\noiiice\node_modules\aws-sdk\lib\credentials.js:122:12)
      at getAsyncCredentials (E:\airpa\noiiice\node_modules\aws-sdk\lib\config.js:361:24)
      at Config.getCredentials (E:\airpa\noiiice\node_modules\aws-sdk\lib\config.js:381:9)
      at Request.VALIDATE_CREDENTIALS (E:\airpa\noiiice\node_modules\aws-sdk\lib\event_listeners.js:81:26)
      at Request.callListeners (E:\airpa\noiiice\node_modules\aws-sdk\lib\sequential_executor.js:102:18)
      at Request.emit (E:\airpa\noiiice\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
      at Request.emit (E:\airpa\noiiice\node_modules\aws-sdk\lib\request.js:683:14)
      at Request.transition (E:\airpa\noiiice\node_modules\aws-sdk\lib\request.js:22:10)
      at AcceptorStateMachine.runTo (E:\airpa\noiiice\node_modules\aws-sdk\lib\state_machine.js:14:12)
      at Request.runTo (E:\airpa\noiiice\node_modules\aws-sdk\lib\request.js:403:15)
      at E:\airpa\noiiice\node_modules\aws-sdk\lib\request.js:792:12
      at new Promise (<anonymous>)
      at Request.promise (E:\airpa\noiiice\node_modules\aws-sdk\lib\request.js:778:12)
      at loadCfOutput (E:\airpa\noiiice\.serverless_plugins\build-apps\index.js:56:70)
      at TaleBuildApps.doWork (E:\airpa\noiiice\.serverless_plugins\build-apps\index.js:176:11)
      at BbPromise.reduce (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:505:55)
      at tryCatcher (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\util.js:16:23)
      at Object.gotValue (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\reduce.js:157:18)
      at Object.gotAccum (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\reduce.js:144:25)
      at Object.tryCatcher (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\promise.js:517:31)
      at Promise._settlePromise (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\promise.js:574:18)
      at Promise._settlePromiseCtx (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\promise.js:611:10)
      at _drainQueueStep (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\async.js:142:12)
      at _drainQueue (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\async.js:131:9)
      at Async._drainQueues (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\async.js:147:5)
      at Immediate.Async.drainQueues (C:\Users\crobi\AppData\Roaming\npm\node_modules\serverless\node_modules\bluebird\js\release\async.js:17:14)
      at runCallback (timers.js:705:18)
      at tryOnImmediate (timers.js:676:5)
      at processImmediate (timers.js:658:5)
      at process.topLevelDomainCallback (domain.js:126:23)

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          win32
     Node Version:              10.16.3
     Framework Version:         1.53.0
     Plugin Version:            3.1.0
     SDK Version:               2.1.1
     Components Core Version:   1.1.1
     Components CLI Version:    1.2.3

from noiiice.

DylanAllen avatar DylanAllen commented on May 29, 2024

I had not finished refactoring the way that plugin uses the AWS sdk (I had for the other plugin). So now it is updated as well, and you should not have that issue. Pull down the recent update and try sls buildNuxtApp --stage dev again. It should use the same profile that the Serverless framework is using for deployment.

Also, thank you for working through this! This is obviously very new, but it has a lot of potential. I really want it to be great, but I still have some work to do and I need other devs to test it out and let me know what does and doesn't work for them.

from noiiice.

airpaio avatar airpaio commented on May 29, 2024

Got a little close this time...

This time sls buildNuxtApp --stage dev removed the apps/app/node-modules/ and then re-installed them. Originally I had just npm installed apps/app/node-modules. That makes me wonder if something in the serverless process is needed as a dependency to run the app locally like the issue I'm having in #5?

Anyways, here is where it got hung up this time:

Serverless: Noiice Nuxt: Building ...
'export' is not recognized as an internal or external command,
operable program or batch file.

  Error --------------------------------------------------

  Error: Command failed: export stage=dev
      at checkExecSyncError (child_process.js:629:11)
      at execSync (child_process.js:666:13)
      at runAppCmd (E:\airpa\noiiice\.serverless_plugins\build-apps\index.js:69:5)
      at nuxtBuild (E:\airpa\noiiice\.serverless_plugins\build-apps\index.js:91:9)
      at buildApps (E:\airpa\noiiice\.serverless_plugins\build-apps\index.js:101:9)
      at TaleBuildApps.doWork (E:\airpa\noiiice\.serverless_plugins\build-apps\index.js:155:5)

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          win32
     Node Version:              10.16.3
     Framework Version:         1.53.0
     Plugin Version:            3.1.0
     SDK Version:               2.1.1
     Components Core Version:   1.1.1
     Components CLI Version:    1.2.3

from noiiice.

DylanAllen avatar DylanAllen commented on May 29, 2024

Fixed. Pull down the master branch and try again.

There is a different syntax for exporting environment variables in windows Command Prompt than there is for Mac (EXPORT vs SET), I added a check for that so it will pick the correct command.

from noiiice.

airpaio avatar airpaio commented on May 29, 2024

Cool! Finally got to the end of the process without throwing any errors. However, it didnt seem to move any files into my S3 mediaBucket that I defined. Somewhere along the way it should have thrown the files from apps/app/ into the S3 mediaBucket, right?

from noiiice.

DylanAllen avatar DylanAllen commented on May 29, 2024

Great! The app is served from a lambda function. That media bucket is for images that you upload through the admin ui after deployment, so there should not be anything in it yet.

from noiiice.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.