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

Create sst generates a broken project #5024

Open
pbalenzuela opened this issue Nov 5, 2024 · 4 comments
Open

Create sst generates a broken project #5024

pbalenzuela opened this issue Nov 5, 2024 · 4 comments
Assignees

Comments

@pbalenzuela
Copy link

I'm using pnpm but it also fails using npm with [email protected] (current latest)

Details

  • There's a missing dependency sst/constructs that is causing the problem
  • .sst directory is not properly created
  System:
    OS: macOS 15.1
    CPU: (11) arm64 Apple M3 Pro
    Memory: 122.36 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
    pnpm: 9.12.3 - /opt/homebrew/bin/pnpm

logs

pn create [email protected]
? Project name my-sst-app
✔ Copied template files

Next steps:
- cd my-sst-app
- npm install (or pnpm install, or yarn)
- npm run dev
/Downloads  5s 517ms                                                                                                                                                    default@us-east-1     63    5,11:26 
cd my-sst-app
/Downloads/my-sst-app  32ms                                                                                                                                20.16.0  default@us-east-1     63    5,11:26 
pn i
Scope: all 3 workspace projects
Packages: +64
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 107, reused 64, downloaded 0, added 64, done

devDependencies:
+ @tsconfig/node18 18.2.4
+ aws-cdk-lib 2.142.1 (2.165.0 is available)
+ constructs 10.3.0 (10.4.2 is available)
+ sst 3.2.76
+ typescript 5.6.3

Done in 3.9s
/Downloads/my-sst-app  4s 36ms                                                                                                                            󰋁 20.16.0  default@us-east-1     63    5,11:27 
pn dev --print-logs

> [email protected] dev /Users/pbalenzuela/Downloads/my-sst-app
> sst dev "--print-logs"

time=2024-11-05T11:27:31.215-03:00 level=INFO msg="checking for pulumi" path="/Users/pbalenzuela/Library/Application Support/sst/bin/pulumi"
time=2024-11-05T11:27:32.023-03:00 level=INFO msg="checking for bun" path="/Users/pbalenzuela/Library/Application Support/sst/bin/bun"
time=2024-11-05T11:27:32.722-03:00 level=INFO msg="initializing project" version=3.2.76
time=2024-11-05T11:27:32.723-03:00 level=INFO msg="esbuild building" out=/Users/pbalenzuela/Downloads/my-sst-app/.sst/platform/sst.config.1730816852723.mjs
time=2024-11-05T11:27:32.731-03:00 level=ERROR msg="esbuild error" text="Could not resolve \"sst/constructs\""
time=2024-11-05T11:27:32.731-03:00 level=ERROR msg="exited with error" err="stacks/MyStack.ts:2:44: Could not resolve \"sst/constructs\""
ELIFECYCLE Command failed with exit code 1.
@jayair
Copy link
Contributor

jayair commented Nov 8, 2024

Our docs shouldn't mention create-sst. Unless you are trying to use v2, our older version.

Where did you see a reference to create-sst?

@jayair jayair self-assigned this Nov 8, 2024
@pbalenzuela
Copy link
Author

pbalenzuela commented Nov 12, 2024

Our docs shouldn't mention create-sst. Unless you are trying to use v2, our older version.

Where did you see a reference to create-sst?

That is a valid point, I'm not sure how I landed there. Still, I have few comments about it:

  1. The generated package.json file uses sst v3, see bellow
  2. https://www.npmjs.com/package/create-sst does not specify the sst version that will be used when creating a new app
  3. I found missing links in the current docs on the left pane
    1. Depending on the page you are some links could appear or be missing
    2. Unfortunately I don't have an example from the top of my head
{
  "name": "my-sst-app",
  "version": "0.0.0",
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "sst dev",
    "build": "sst build",
    "deploy": "sst deploy",
    "remove": "sst remove",
    "console": "sst console",
    "typecheck": "tsc --noEmit"
  },
  "devDependencies": {
    "sst": "^3.3.19",
    "aws-cdk-lib": "2.142.1",
    "constructs": "10.3.0",
    "typescript": "^5.6.3",
    "@tsconfig/node18": "^18.2.4"
  },
  "workspaces": [
    "packages/*"
  ]
}

@jayair
Copy link
Contributor

jayair commented Nov 15, 2024

Depending on the page you are some links could appear or be missing

Can you share these?

For create-sst I'll add a note to the README about the version.

@pbalenzuela
Copy link
Author

Depending on the page you are some links could appear or be missing

Can you share these?

For create-sst I'll add a note to the README about the version.

I will create a separate issue when I face one again

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

No branches or pull requests

2 participants