Coder Social home page Coder Social logo

Comments (19)

humemm avatar humemm commented on August 18, 2024 3

I was able to track down the issue with my init after running with the newly provided details in --verbose. Init script was failing on bun install. I found this issue oven-sh/bun#4988 it suggested that bun is having issues with ipv6. After disabling ipv6 init/bun works as expected. Maybe don't use bun or get bun to fix the upstream bugs.

from ion.

stamatim avatar stamatim commented on August 18, 2024 1

@thdxr I am still having some issues, here is what I did:

Steps

  1. Install sst - curl -fsSL https://ion.sst.dev/install | bash (v0.0.193)
  2. Create Next.js app - npx create-next-app@latest ion-nextjs --typescript --tailwind --eslint
  3. cd ion-nextjs
  4. Init sst - AWS_PROFILE="personal" sst init --verbose

Output

▲ (0xMBP14.lan) ion-nextjs [main] AWS_PROFILE="personal" sst init --verbose
time=2024-03-22T11:31:37.883-05:00 level=INFO msg="checking for bun" path="/Users/stamati/Library/Application Support/sst/bin/bun"

   ███████╗███████╗████████╗
   ██╔════╝██╔════╝╚══██╔══╝
   ███████╗███████╗   ██║   
   ╚════██║╚════██║   ██║   
   ███████║███████║   ██║   
   ╚══════╝╚══════╝   ╚═╝   

>  Next.js detected. This will...
   - create an sst.config.ts
   - modify the tsconfig.json
   - add the sst sdk to package.json

✓  Template: nextjs

✓  Using: aws

time=2024-03-22T11:31:39.918-05:00 level=INFO msg="creating project" name=ion-nextjs
time=2024-03-22T11:31:39.919-05:00 level=INFO msg="copying template" path=templates/nextjs/files/sst-env.d.ts
time=2024-03-22T11:31:39.919-05:00 level=INFO msg="copying template" path=templates/nextjs/files/sst.config.ts
time=2024-03-22T11:31:39.920-05:00 level=INFO msg=patching file=tsconfig.json
time=2024-03-22T11:31:39.924-05:00 level=INFO msg=patching file=package.json
time=2024-03-22T11:31:39.927-05:00 level=INFO msg="handling .gitignore" section="# open-next"
⠋  Installing providers...time=2024-03-22T11:31:39.929-05:00 level=INFO msg="esbuild building"
time=2024-03-22T11:31:39.941-05:00 level=INFO msg="esbuild built" outfile=/Users/stamati/Developer/Sandbox/ion-nextjs/.sst/eval/eval-1711125099928.mjs
time=2024-03-22T11:31:39.942-05:00 level=INFO msg="evaluating config"
time=2024-03-22T11:31:39.988-05:00 level=INFO msg="config evaluated"
time=2024-03-22T11:31:39.988-05:00 level=INFO msg="installing platform"
⠙  Installing providers...time=2024-03-22T11:31:40.046-05:00 level=INFO msg="installing deps"
time=2024-03-22T11:31:40.046-05:00 level=INFO msg="writing package.json"
time=2024-03-22T11:31:40.046-05:00 level=INFO msg="adding dependency" name=aws
time=2024-03-22T11:31:40.047-05:00 level=INFO msg="fetching deps"
⠋  Installing providers...time=2024-03-22T11:31:41.021-05:00 level=ERROR msg="exited with error" err="failed to run bun install bun install v1.0.35 (940448d6)\nnode:internal/child_process:1124\n    result.error = new ErrnoException(result.error, 'spawnSync ' + options.file);\n                   ^\n\n<ref *1> Error: spawnSync /Users/stamati/Developer/Sandbox/ion-nextjs/.sst/platform/node_modules/esbuild/bin/esbuild EACCES\n    at Object.spawnSync (node:internal/child_process:1124:20)\n    at spawnSync (node:child_process:876:24)\n    at Object.execFileSync (node:child_process:919:15)\n    at validateBinaryVersion (/Users/stamati/Developer/Sandbox/ion-nextjs/.sst/platform/node_modules/esbuild/install.js:99:28)\n    at /Users/stamati/Developer/Sandbox/ion-nextjs/.sst/platform/node_modules/esbuild/install.js:286:5 {\n  errno: -13,\n  code: 'EACCES',\n  syscall: 'spawnSync /Users/stamati/Developer/Sandbox/ion-nextjs/.sst/platform/node_modules/esbuild/bin/esbuild',\n  path: '/Users/stamati/Developer/Sandbox/ion-nextjs/.sst/platform/node_modules/esbuild/bin/esbuild',\n  spawnargs: [ '--version' ],\n  error: [Circular *1],\n  status: null,\n  signal: null,\n  output: null,\n  pid: 0,\n  stdout: null,\n  stderr: null\n}\n\nNode.js v21.5.0\n\nerror: postinstall script from \"esbuild\" exited with 1\n"
×  Unexpected error occurred. Please check the logs or run with --verbose for more details.

from ion.

ethan-stone-gas avatar ethan-stone-gas commented on August 18, 2024

Was able to resolve this thanks to help from this comment. https://discord.com/channels/983865673656705025/1177071497974648952/1220363650997686293

By specifying the AWS_PROFILE="my-profile" sst init it worked. Will leave this issue open now in case you all want to investigate further and confirm that's the cause.

from ion.

thdxr avatar thdxr commented on August 18, 2024

can you still create this issue on 0.0.189 of sst?

from ion.

ethan-stone-gas avatar ethan-stone-gas commented on August 18, 2024

I have not been able to reproduce it, unfortunately. I logged out of all sso sessions on my machine and now even sst init without specifying AWS_PROFILE seems to be working now as well.

from ion.

stamatim avatar stamatim commented on August 18, 2024

I am also encountering this.

Steps

npx create-next-app@latest ion-test --typescript --tailwind --eslint
cd ion-test
AWS_PROFILE="personal" sst init

Output

▲ (0xMBP14.lan) Sandbox AWS_PROFILE="personal" sst init

   ███████╗███████╗████████╗
   ██╔════╝██╔════╝╚══██╔══╝
   ███████╗███████╗   ██║
   ╚════██║╚════██║   ██║
   ███████║███████║   ██║
   ╚══════╝╚══════╝   ╚═╝

>  Next.js detected. This will...
   - create an sst.config.ts
   - modify the tsconfig.json
   - add the sst sdk to package.json

✓  Template: nextjs

✓  Using: aws

×  Unexpected error occurred. Please check the logs for more details.

from ion.

stamatim avatar stamatim commented on August 18, 2024

Something else I noticed as well is that after running the sst init command, the following files were modified while the command was running and the contents of each file are empty:

  1. .gitignore
  2. package-lock.json
  3. package.json
  4. sst-env.d.ts
  5. tsconfig.json

from ion.

humemm avatar humemm commented on August 18, 2024

I'm encountering a similar issue.

screenshot

from ion.

oieduardorabelo avatar oieduardorabelo commented on August 18, 2024

i don't have aws profile available globally, i use aws-vault

and sst init , in a new directory (empty folder), doesn't work, it exits with ?1:

CleanShot 2024-03-23 at 01 53 57

from ion.

thdxr avatar thdxr commented on August 18, 2024

for those of you seeing an error when installing providers i pushed verison 190 should potentially have better info in --verbose mode if you can share that

from ion.

thdxr avatar thdxr commented on August 18, 2024

i don't have aws profile available globally, i use aws-vault

and sst init , in a new directory (empty folder), doesn't work, it exits with ?1:

CleanShot 2024-03-23 at 01 53 57

i'm not sure about this - sst init should not require any aws information at all, can you verify you're on the latest version and show me the output from --verbose

from ion.

oieduardorabelo avatar oieduardorabelo commented on August 18, 2024

i don't have aws profile available globally, i use aws-vault
and sst init , in a new directory (empty folder), doesn't work, it exits with ?1:
CleanShot 2024-03-23 at 01 53 57

i'm not sure about this - sst init should not require any aws information at all, can you verify you're on the latest version and show me the output from --verbose

i executed curl -fsSL https://ion.sst.dev/install | bash again, using version 0.0.191

CleanShot 2024-03-23 at 04 41 27

working as expected, thank you! 🚀

from ion.

jayair avatar jayair commented on August 18, 2024

Thanks for tracking it down. @thdxr take a look?

from ion.

imdkbj avatar imdkbj commented on August 18, 2024

Hey @thdxr
providers credentials are not being utilised in sst dev too. Have to explicitly pass
AWS_PROFILE="personal" sst dev

Tried Below in old and new repo but no luck

 providers: {
        aws: {
          region: "ap-south-1",
          accessKey: "A",
          secretKey: "B",
        },
      }

or
profile: "personal"

It is taking default profile only.

from ion.

thdxr avatar thdxr commented on August 18, 2024

we added a NO_BUN environment variable for now, will follow up on the bun issue ty

from ion.

gyenabubakar avatar gyenabubakar commented on August 18, 2024

I'm facing this issue in a SvelteKit app. Using the curl / bash installation and npx sst@ion:

time=2024-07-28T10:31:47.906Z level=INFO msg="checking for pulumi" path="/Users/gyen/Library/Application Support/sst/bin/pulumi"
time=2024-07-28T10:31:48.185Z level=INFO msg="checking for bun" path="/Users/gyen/Library/Application Support/sst/bin/bun"

   ███████╗███████╗████████╗
   ██╔════╝██╔════╝╚══██╔══╝
   ███████╗███████╗   ██║
   ╚════██║╚════██║   ██║
   ███████║███████║   ██║
   ╚══════╝╚══════╝   ╚═╝

>  SvelteKit detected. This will...
   - create an sst.config.ts
   - add sst to package.json

✓  Template: svelte-kit

time=2024-07-28T10:31:51.957Z level=INFO msg="creating project" name=the-sveltekit-app
time=2024-07-28T10:31:51.959Z level=ERROR msg="exited with error" err="invalid character ']' looking for beginning of value"
✕  Unexpected error occurred. Please check the logs or run with --verbose for more details.

from ion.

behboud avatar behboud commented on August 18, 2024

@gyenabubakar I had similar issue and resolved it by removing old sst bootstrap including parameter store entries.

from ion.

gyenabubakar avatar gyenabubakar commented on August 18, 2024

@gyenabubakar I had similar issue and resolved it by removing old sst bootstrap including parameter store entries.

@behboud I did not understand what you said 😅. What am I removing, and how?

from ion.

jayair avatar jayair commented on August 18, 2024

@gyenabubakar Have you used SST on this AWS account before? I think @behboud means he cleared the state: https://ion.sst.dev/docs/state/

from ion.

Related Issues (20)

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.