Title: No build script in the default package.json · Issue #34 · staticwebdev/vanilla-basic · GitHub
Open Graph Title: No build script in the default package.json · Issue #34 · staticwebdev/vanilla-basic
X Title: No build script in the default package.json · Issue #34 · staticwebdev/vanilla-basic
Description: After following https://learn.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vanilla-javascript my first deploy failed with logs like this: /usr/bin/docker run --name c0442fd7fd7dbfb744c4f92002043a0736abb_229844 --label 6...
Open Graph Description: After following https://learn.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vanilla-javascript my first deploy failed with logs like this: /usr/bin/docker run --name c0442fd7fd7dbf...
X Description: After following https://learn.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vanilla-javascript my first deploy failed with logs like this: /usr/bin/docker run --name c0442fd7fd7dbf...
Opengraph URL: https://github.com/staticwebdev/vanilla-basic/issues/34
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No build script in the default package.json","articleBody":"After following https://learn.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vanilla-javascript my first deploy failed with logs like this:\r\n\r\n```\r\n/usr/bin/docker run --name c0442fd7fd7dbfb744c4f92002043a0736abb_229844 --label 6c0442 --workdir /github/workspace --rm -e \"INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN\" -e \"INPUT_REPO_TOKEN\" -e \"INPUT_ACTION\" -e \"INPUT_APP_LOCATION\" -e \"INPUT_API_LOCATION\" -e \"INPUT_OUTPUT_LOCATION\" -e \"INPUT_API_BUILD_COMMAND\" -e \"INPUT_APP_ARTIFACT_LOCATION\" -e \"INPUT_APP_BUILD_COMMAND\" -e \"INPUT_ROUTES_LOCATION\" -e \"INPUT_SKIP_APP_BUILD\" -e \"INPUT_CONFIG_FILE_LOCATION\" -e \"INPUT_SKIP_API_BUILD\" -e \"INPUT_PRODUCTION_BRANCH\" -e \"INPUT_DEPLOYMENT_ENVIRONMENT\" -e \"INPUT_IS_STATIC_EXPORT\" -e \"INPUT_DATA_API_LOCATION\" -e \"HOME\" -e \"GITHUB_JOB\" -e \"GITHUB_REF\" -e \"GITHUB_SHA\" -e \"GITHUB_REPOSITORY\" -e \"GITHUB_REPOSITORY_OWNER\" -e \"GITHUB_REPOSITORY_OWNER_ID\" -e \"GITHUB_RUN_ID\" -e \"GITHUB_RUN_NUMBER\" -e \"GITHUB_RETENTION_DAYS\" -e \"GITHUB_RUN_ATTEMPT\" -e \"GITHUB_REPOSITORY_ID\" -e \"GITHUB_ACTOR_ID\" -e \"GITHUB_ACTOR\" -e \"GITHUB_TRIGGERING_ACTOR\" -e \"GITHUB_WORKFLOW\" -e \"GITHUB_HEAD_REF\" -e \"GITHUB_BASE_REF\" -e \"GITHUB_EVENT_NAME\" -e \"GITHUB_SERVER_URL\" -e \"GITHUB_API_URL\" -e \"GITHUB_GRAPHQL_URL\" -e \"GITHUB_REF_NAME\" -e \"GITHUB_REF_PROTECTED\" -e \"GITHUB_REF_TYPE\" -e \"GITHUB_WORKFLOW_REF\" -e \"GITHUB_WORKFLOW_SHA\" -e \"GITHUB_WORKSPACE\" -e \"GITHUB_ACTION\" -e \"GITHUB_EVENT_PATH\" -e \"GITHUB_ACTION_REPOSITORY\" -e \"GITHUB_ACTION_REF\" -e \"GITHUB_PATH\" -e \"GITHUB_ENV\" -e \"GITHUB_STEP_SUMMARY\" -e \"GITHUB_STATE\" -e \"GITHUB_OUTPUT\" -e \"RUNNER_OS\" -e \"RUNNER_ARCH\" -e \"RUNNER_NAME\" -e \"RUNNER_TOOL_CACHE\" -e \"RUNNER_TEMP\" -e \"RUNNER_WORKSPACE\" -e \"ACTIONS_RUNTIME_URL\" -e \"ACTIONS_RUNTIME_TOKEN\" -e \"ACTIONS_CACHE_URL\" -e GITHUB_ACTIONS=true -e CI=true -v \"/var/run/docker.sock\":\"/var/run/docker.sock\" -v \"/home/runner/work/_temp/_github_home\":\"/github/home\" -v \"/home/runner/work/_temp/_github_workflow\":\"/github/workflow\" -v \"/home/runner/work/_temp/_runner_file_commands\":\"/github/file_commands\" -v \"/home/runner/work/staticwebdev/staticwebdev\":\"/github/workspace\" 6c0442:fd7fd7dbfb744c4f92002043a0736abb\r\nDeploymentId: 87d77552-21a5-4807-80fc-315a829fc18f\r\n\r\nApp Directory Location: '/' was found.\r\nLooking for event info\r\nStarting to build app with Oryx\r\nAzure Static Web Apps utilizes Oryx to build both static applications and Azure Functions. You can find more details on Oryx here: https://github.com/microsoft/Oryx\r\n---Oryx build logs---\r\n\r\n\r\nOperation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx\r\nYou can report issues at https://github.com/Microsoft/Oryx/issues\r\n\r\nOryx Version: 0.2.20221[10](https://github.com/foolip/staticwebdev/actions/runs/4597879955/jobs/8121162205#step:4:11)3.1, Commit: a2c65dde152b749fea395f4d1242ea9350942258, ReleaseTagName: 2022[11](https://github.com/foolip/staticwebdev/actions/runs/4597879955/jobs/8121162205#step:4:12)03.1\r\n\r\nBuild Operation ID: |julP4J9dgIQ=.3ba08750_\r\nRepository Commit : 7ec1c3bb097bfd385b1ea9b88cdee3c363b6647f\r\n\r\nDetecting platforms...\r\nDetected following platforms:\r\n nodejs: [16](https://github.com/foolip/staticwebdev/actions/runs/4597879955/jobs/8121162205#step:4:17).[19](https://github.com/foolip/staticwebdev/actions/runs/4597879955/jobs/8121162205#step:4:20).0\r\nVersion '16.19.0' of platform 'nodejs' is not installed. Generating script to install it...\r\nError: Could not find either 'build' or 'build:azure' node under 'scripts' in package.json. Could not find value for custom run build command using the environment variable key 'RUN_BUILD_COMMAND'.Could not find tools for building monorepos, no 'lerna.json' or 'lage.config.js' files found.\r\n\r\n\r\n---End of Oryx build logs---\r\nOryx could not find a 'build' or 'build:azure' script in the package configuration. Please add one of these commands to your package configuration file (i.e. package.json). Alternatively, you can add the app_build_command to the build/deploy section of your workflow file. For example, app_build_command: 'npm run docs:build'\r\n\r\nFor further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/\r\nIf you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/\r\nExiting\r\n```\r\n\r\nThe important part:\r\n\r\n\u003e Oryx could not find a 'build' or 'build:azure' script in the package configuration.\r\n\r\nAdding a build script fixed this. A small (but wrong) fix is:\r\n\r\n```diff\r\n--- a/package.json\r\n+++ b/package.json\r\n@@ -2,6 +2,7 @@\r\n \"name\": \"vanilla-basic\",\r\n \"version\": \"1.0.0\",\r\n \"scripts\": { \r\n+ \"build\": \"cp -a src dist\",\r\n \"start\": \"sirv ./src public --cors --single --no-clear --port 8000\"\r\n }\r\n }\r\n```","author":{"url":"https://github.com/foolip","@type":"Person","name":"foolip"},"datePublished":"2023-04-03T14:42:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/34/vanilla-basic/issues/34"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ccb55030-f0ca-80a3-4555-640ab478d8d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB62:1A40FC:1BE646:24E380:6969BBD9 |
| html-safe-nonce | 33985f64f989ab54308a6073e18a31b1da7fdc2d85cb95fa5b5fa073f2bfef2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjYyOjFBNDBGQzoxQkU2NDY6MjRFMzgwOjY5NjlCQkQ5IiwidmlzaXRvcl9pZCI6IjQxMzExMjAzNTk5MTk5NTkwMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 82027cf6f294233e9f8e903a1fb35fa54f52ffd17a62c67c82d2ac247fb5d43a |
| hovercard-subject-tag | issue:1652213737 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/staticwebdev/vanilla-basic/34/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4692ddd4a7e71cbc53f628e4df4fddbcc1907c1c7ac212fefab09d0f592c309b/staticwebdev/vanilla-basic/issues/34 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4692ddd4a7e71cbc53f628e4df4fddbcc1907c1c7ac212fefab09d0f592c309b/staticwebdev/vanilla-basic/issues/34 |
| og:image:alt | After following https://learn.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vanilla-javascript my first deploy failed with logs like this: /usr/bin/docker run --name c0442fd7fd7dbf... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | foolip |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/staticwebdev/vanilla-basic git https://github.com/staticwebdev/vanilla-basic.git |
| octolytics-dimension-user_id | 62345156 |
| octolytics-dimension-user_login | staticwebdev |
| octolytics-dimension-repository_id | 251693511 |
| octolytics-dimension-repository_nwo | staticwebdev/vanilla-basic |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 251693511 |
| octolytics-dimension-repository_network_root_nwo | staticwebdev/vanilla-basic |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width