Open yannnis opened 4 years ago
I can also not get this working:
app: online-surveys-ui
name: online-surveys-ui
org: nathansainsburyjisc
component: website
stage: dev
provider:
name: aws
runtime: nodejs12.x
profile: online-surveys
inputs:
src:
src: ./src
hook: npm run build:${stage}
dist: ./build
When running:
sls deploy --stage dev
or
sls deploy --stage prod
I get the following error:
Serverless › Failed running "src.hook": "npm run build:${stage}" due to the following error: "undefined"
My packagage.json
has these scripts:
"scripts": {
"start": "react-scripts start",
"start:local": "REACT_APP_ENV=local HOST=0.0.0.0 react-scripts start",
"build:local": "REACT_APP_ENV=local react-scripts build",
"build:dev": "REACT_APP_ENV=dev react-scripts build",
"build:prod": "REACT_APP_ENV=prod react-scripts build",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
}
Also, I'm using:
components version: 3.1.3
Description
Hi folks . We are finding that the template below doesn't work. the stage parameter is just not taken into account on the hook (removed it on the example below) or the dist parameters.
Example error when trying the stage variable on dist
Anything I m doing wrong?
Additional Data