Michael Robellard
02/03/2022, 10:14 PMconst site = new sst.StaticSite(this, "VueJSSite", {
path: "frontend",
buildOutput: "dist",
buildCommand: "npm run build",
errorPage: sst.StaticSiteErrorOptions.REDIRECT_TO_INDEX_PAGE,
customDomain: {
hostedZone: "<http://chartflow.io|chartflow.io>",
domainName:
scope.stage === "prod" ? "<http://www.chartflow.io|www.chartflow.io>" : `${scope.stage}.<http://chartflow.io|chartflow.io>`,
domainAlias: scope.stage === "prod" ? "<http://chartflow.io|chartflow.io>" : undefined,
},
environment: {
VITE_API_URL: scope.stage === "prod" ? "<https://api.chartflow.io>" : `<https://api>.${scope.stage}.<http://chartflow.io|chartflow.io>`
}
});
and here is the error message I get:
Building static site frontend
> frontend@0.0.0 build
> vite build
sh: 1: vite: not found
Error: There was a problem building the "VueJSSite" StaticSite.
at StaticSite.buildApp (/tmp/seed/source/node_modules/@serverless-stack/resources/src/StaticSite.ts:203:15)
at new StaticSite (/tmp/seed/source/node_modules/@serverless-stack/resources/src/StaticSite.ts:95:24)
at new SiteStack (/tmp/seed/source/stacks/site.js:8:22)
at Object.main (/tmp/seed/source/stacks/index.js:30:3)
at Object.<anonymous> (/tmp/seed/source/.build/run.js:94:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
Error: Subprocess exited with error 1
at ChildProcess.<anonymous> (/tmp/seed/source/node_modules/aws-cdk/lib/api/cxapp/exec.ts:127:23)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:467:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
There was an error synthesizing your app.
ERROR: Error: Subprocess exited with error 1
Any help would be appreciatedFrank
seed.yml
that looks something like this:
before_build:
- cd my/frontend/app && npm install
Frank
seed.yml
file to the root of the repo. Here are more details https://seed.run/docs/adding-a-build-spec.html