jamstack-cms / jamstack-cms

Modern full stack CMS. Built with Gatsby, GraphQL, AWS Amplify, and Serverless technologies.

Home Page:https://www.jamstackcms.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An error occured during the push operation: null

PhilosoD00M opened this issue · comments

When following the steps in "Deploying the CMS" in README, when I try to run the command

amplify push

I get the following error:

× An error occurred when pushing the resources to the cloud

null
An error occured during the push operation: null

Same issue for me. Is it supposed to a cognito user pool on amplify init and point the roles there? It does not get created for me.

image

Same issue for me. Is it supposed to a cognito user pool on amplify init and point the roles there? It does not get created for me.

That stinks you're having the same problem, but I'm also glad it's not me. :) I'll poke around during my lunch today and see what I can't find.

I've tried amplify push on two computers and Cloud9, and I get the same errors in all places.

Hi @tara-leonard @itsJASPERr can you all give me the version of the Amplify CLI that you all are using?

Also, one thing is to make sure you are using a globally unique environment name for now (this issue will be fixed soon)

@dabit3 I was on 3.16.0 on my laptops and 3.17.0 in Cloud9.

Huzzah! @dabit3, I named my amplify push env something really silly, and it pushed!

There is a new error now, though, when I run npm run jamstack-develop:

Error in "/home/ec2-user/environment/jamstack-cms/gatsby-node.js": navigator is not defined

Error: /home/ec2-user/environment/jamstack-cms/node_modules/@aws-amplify/analytics/dist/aws-amplify-analytics.js:1
  ReferenceError: navigator is not defined

Full dump:

0 info it worked if it ends with ok
1 verbose cli [ '/home/ec2-user/.nvm/versions/node/v10.16.3/bin/node',
1 verbose cli   '/home/ec2-user/.nvm/versions/node/v10.16.3/bin/npm',
1 verbose cli   'run',
1 verbose cli   'jamstack-develop' ]
2 info using npm@6.12.1
3 info using node@v10.16.3
4 verbose run-script [ 'prejamstack-develop',
4 verbose run-script   'jamstack-develop',
4 verbose run-script   'postjamstack-develop' ]
5 info lifecycle gatsby-starter-blog@0.1.0~prejamstack-develop: gatsby-starter-blog@0.1.0
6 info lifecycle gatsby-starter-blog@0.1.0~jamstack-develop: gatsby-starter-blog@0.1.0
7 verbose lifecycle gatsby-starter-blog@0.1.0~jamstack-develop: unsafe-perm in lifecycle true
8 verbose lifecycle gatsby-starter-blog@0.1.0~jamstack-develop: PATH: /home/ec2-user/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ec2-user/environment/jamstack-cms/node_modules/.bin:/home/ec2-user/.nvm/versions/node/v10.16.3/bin:/home/ec2-user/.rvm/gems/ruby-2.6.3/bin:/home/ec2-user/.rvm/gems/ruby-2.6.3@global/bin:/home/ec2-user/.rvm/rubies/ruby-2.6.3/bin:/home/ec2-user/.rvm/gems/ruby-2.6.3/bin:/home/ec2-user/.rvm/gems/ruby-2.6.3@global/bin:/home/ec2-user/.rvm/rubies/ruby-2.6.3/bin:/usr/local/bin:/bin:/usr/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/home/ec2-user/.rvm/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/home/ec2-user/.rvm/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin
9 verbose lifecycle gatsby-starter-blog@0.1.0~jamstack-develop: CWD: /home/ec2-user/environment/jamstack-cms
10 silly lifecycle gatsby-starter-blog@0.1.0~jamstack-develop: Args: [ '-c', 'node createConfig.js && gatsby develop' ]
11 silly lifecycle gatsby-starter-blog@0.1.0~jamstack-develop: Returned: code: 1  signal: null
12 info lifecycle gatsby-starter-blog@0.1.0~jamstack-develop: Failed to exec jamstack-develop script
13 verbose stack Error: gatsby-starter-blog@0.1.0 jamstack-develop: `node createConfig.js && gatsby develop`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/home/ec2-user/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/home/ec2-user/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid gatsby-starter-blog@0.1.0
15 verbose cwd /home/ec2-user/environment/jamstack-cms
16 verbose Linux 4.14.146-93.123.amzn1.x86_64
17 verbose argv "/home/ec2-user/.nvm/versions/node/v10.16.3/bin/node" "/home/ec2-user/.nvm/versions/node/v10.16.3/bin/npm" "run" "jamstack-develop"
18 verbose node v10.16.3
19 verbose npm  v6.12.1
20 error code ELIFECYCLE
21 error errno 1
22 error gatsby-starter-blog@0.1.0 jamstack-develop: `node createConfig.js && gatsby develop`
22 error Exit status 1
23 error Failed at the gatsby-starter-blog@0.1.0 jamstack-develop script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@tara-leonard Thanks for the updates! I'm trying to reproduce now.

Hmm. Was unable to reproduce. @tara-leonard what environment are you on / version of node.js? Once thing I would maybe try is to delete your node_modules and instead try installing them using Yarn.

I'm in Cloud9 running Amazon Linux with node.js v12.13.0, and I also had the same error on my Win10 laptop on node.js v12.13.0.

I deleted node_modules, ran yarn install, and I still have the same error. 🤔 I'll try a few other environments.

@tara-leonard I'm not sure what the issue is, but I'm assuming it has something to do with an env specific variation from what I'm testing on. I just successfully tested on v12.13.0 albeit I had to run npm rebuild before it would work properly. 🤔

Let me continue to troubleshoot and give this some more thought, if you have any other info you think may be valuable to share please do. Sorry you're experiencing this issue

@dabit3 versions for me are the same: amplify 3.16 node v12.13.0 the first time I ran init with a non-unique env name, but multiple times afterwards. Same error still. updated to amplify --version 3.17: same error

working on a thinkpad with ubuntu 18 with default shell and vscode

@tara-leonard I'm not sure what the issue is, but I'm assuming it has something to do with an env specific variation from what I'm testing on. I just successfully tested on v12.13.0 albeit I had to run npm rebuild before it would work properly. 🤔

Let me continue to troubleshoot and give this some more thought, if you have any other info you think may be valuable to share please do. Sorry you're experiencing this issue

No problem! It's all part and parcel of the process. I'll be digging into it more when I get home from work this evening. :)

Awesome, hopefully this helps you out. Also thanks for the feedback @itsJASPERr, not sure what the issue is. Have you tried running npm rebuild?

Awesome, hopefully this helps you out. Also thanks for the feedback @itsJASPERr, not sure what the issue is. Have you tried running npm rebuild?

Sure thing!

running npm rebuild won't help either. Could this be a problem, I've tried on eu-central-1 and us-east-1, same error? It is pretty frustrating, that there is no info about that error but null.
I've tried running it in Cloud9 and it didn't work either.

I am not sure what caused the problem. However, I just cleaned up all the failed envs and used yarn. It just pushed 🤷‍♂️ 🎉

Thanks for staying onto this! :-)

@dabit3 It works! Deployed on Amplify! \o/

@itsJASPERr Try cloning the latest and following the install instruction to the nth degree. It worked for me. ... I think I might have been running amplify init on my own. Oops. 😊

Hey, Thanks @tara-leonard for the update! Yes, I forgot to comment here, but I have updated the instructions and have pushed some changes that bypass the need to create a unique environment name because the CLI instructions will essentially create a unique bucket name for you without you having to worry about anything.

@itsJASPERr When you try again, let us know if it works! If it does, I'll close this bad boy.

@tara-leonard can close 😄 🙌 it worked yesterday with yarn, though I believe it was due to my messed up envs caused by so many attempts 🙈 thank you!

@itsJASPERr I'm so glad to hear that! Have fun!! :D