frankcollins3 / fill_container

codecamp team project updated with new icon screen menu + puppeteer icon search, GraphQL, redux, relational psql !mongo, and accuweatherAPI
1 stars 0 forks source link

πŸ’§πŸ’§πŸ’§πŸ’§πŸ’§πŸ’§AzureπŸ’§πŸ’§πŸ’§πŸ’§πŸ’§πŸ’§ [2:01am] #266

Open frankcollins3 opened 1 year ago

frankcollins3 commented 1 year ago

attempting to do: deploy

error: posted an issue about EC2 oddly needing an instance to be shut down and relaunched over and over.

first proposed approach: 0: try azure, with willingness to learn aws EC2 and friends. learn EC2 at start of an app instead of when its ready to deploy. So trying azure is already a first step's measure of overcoming the deployment obstacles.

frankcollins3 commented 1 year ago

first deployment:

12:27:06 AM WaterAPP: Starting deployment...
12:37:30 AM WaterAPP: Creating zip package...
12:37:32 AM WaterAPP: Ignoring files from "appService.zipIgnorePattern"
"node_modules{,/**}"
".vscode{,/**}"
12:41:58 AM WaterAPP: Zip package size: 478 MB
12:41:59 AM WaterAPP: Fetching changes.
12:42:00 AM WaterAPP: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/bb739490-6a8e-4d3f-b064-7f49dac4b292.zip (461.67 MB) to /tmp/zipdeploy/extracted
🚨🚨🚨🚨🚨🚨 **12:42:00 AM WaterAPP: Central Directory corrupt.**🚨🚨🚨🚨🚨🚨 
12:42:11 AM WaterAPP: Deployment failed.

looked through videos for an hour (attempting redeployment was probably better idea). Changed node runtime from 14 to 18 even though my current node version is 14.x

1:36:49 AM WaterAPP: Starting deployment...
1:36:51 AM WaterAPP: Creating zip package...
1:37:08 AM WaterAPP: Ignoring files from "appService.zipIgnorePattern"
"node_modules{,/**}"
".vscode{,/**}"
1:41:12 AM WaterAPP: Zip package size: 478 MB
1:41:13 AM WaterAPP: Fetching changes.
1:41:15 AM WaterAPP: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/2b808461-e6e7-474d-9434-a27937a1c7bf.zip (463.54 MB) to /tmp/zipdeploy/extracted
1:43:08 AM WaterAPP: Updating submodules.
1:43:09 AM WaterAPP: Preparing deployment for commit id 'a70db609-d'.
1:43:09 AM WaterAPP: PreDeployment: context.CleanOutputPath False
1:43:09 AM WaterAPP: PreDeployment: context.OutputPath /home/site/wwwroot
1:43:09 AM WaterAPP: Repository path is /tmp/zipdeploy/extracted
1:43:10 AM WaterAPP: Running oryx build...
1:43:10 AM WaterAPP: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 18 -p virtualenv_name= --log-file /tmp/build-debug.log  -i /tmp/8db7c518c82d953 -p compress_node_modules=tar-gz | tee /tmp/oryx-build.log
1:43:12 AM WaterAPP: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
1:43:12 AM WaterAPP: You can report issues at https://github.com/Microsoft/Oryx/issues
1:43:12 AM WaterAPP: Oryx Version: 0.2.20230508.1, Commit: 7fe2bf39b357dd68572b438a85ca50b5ecfb4592, ReleaseTagName: 20230508.1
1:43:12 AM WaterAPP: Build Operation ID: 5bc67e72476fd617
1:43:12 AM WaterAPP: Repository Commit : a70db609-d220-4c1e-8d98-ba9853aa6d3f
1:43:12 AM WaterAPP: OS Type           : bullseye
1:43:12 AM WaterAPP: Image Type        : githubactions
1:43:12 AM WaterAPP: Detecting platforms...
1:43:23 AM WaterAPP: Detected following platforms:
1:43:23 AM WaterAPP:   nodejs: 18.16.0
1:43:23 AM WaterAPP:   php: 8.0.28
1:43:24 AM WaterAPP: Version '18.16.0' of platform 'nodejs' is not installed. Generating script to install it...
1:43:24 AM WaterAPP: Version '8.0.28' of platform 'php' is not installed. Generating script to install it...
1:43:24 AM WaterAPP: Detected the following frameworks: React
1:43:24 AM WaterAPP: Using intermediate directory '/tmp/8db7c518c82d953'.
1:43:25 AM WaterAPP: Copying files to the intermediate directory...
1:45:34 AM WaterAPP: Done in 130 sec(s).
1:45:34 AM WaterAPP: Source directory     : /tmp/8db7c518c82d953
1:45:34 AM WaterAPP: Destination directory: /home/site/wwwroot
1:45:34 AM WaterAPP: Downloading and extracting 'nodejs' version '18.16.0' to '/tmp/oryx/platforms/nodejs/18.16.0'...
1:45:34 AM WaterAPP: Detected image debian flavor: bullseye.
1:45:35 AM WaterAPP: Downloaded in 1 sec(s).
1:45:35 AM WaterAPP: Verifying checksum...
1:45:35 AM WaterAPP: Extracting contents...
1:45:41 AM WaterAPP: performing sha512 checksum for: nodejs...
1:45:42 AM WaterAPP: Done in 8 sec(s).
1:45:42 AM WaterAPP: Downloading and extracting 'php' version '8.0.28' to '/tmp/oryx/platforms/php/8.0.28'...
1:45:42 AM WaterAPP: Detected image debian flavor: bullseye.
1:45:43 AM WaterAPP: Downloaded in 1 sec(s).
1:45:43 AM WaterAPP: Verifying checksum...
1:45:43 AM WaterAPP: Extracting contents...
1:45:45 AM WaterAPP: performing sha512 checksum for: php...
1:45:45 AM WaterAPP: Done in 3 sec(s).
1:45:46 AM WaterAPP: Downloading and extracting 'php-composer' version '2.0.8' to '/tmp/oryx/platforms/php-composer/2.0.8'...
1:45:46 AM WaterAPP: Detected image debian flavor: bullseye.
1:45:46 AM WaterAPP: Downloaded in 0 sec(s).
1:45:46 AM WaterAPP: Verifying checksum...
1:45:46 AM WaterAPP: Extracting contents...
1:45:46 AM WaterAPP: performing sha512 checksum for: php-composer...
1:45:46 AM WaterAPP: Done in 0 sec(s).
1:45:47 AM WaterAPP: Removing existing manifest file
1:45:47 AM WaterAPP: Creating directory for command manifest file if it does not exist
1:45:47 AM WaterAPP: Creating a manifest file...
1:45:47 AM WaterAPP: Node Build Command Manifest file created.
1:45:47 AM WaterAPP: Using Node version:
1:45:47 AM WaterAPP: v18.16.0
1:45:47 AM WaterAPP: Using Npm version:
1:45:50 AM WaterAPP: 9.5.1
1:45:50 AM WaterAPP: Running 'npm install'...
1:45:59 AM WaterAPP: npm WARN old lockfile 
1:45:59 AM WaterAPP: npm WARN old lockfile The package-lock.json file was created with an old version of npm,
1:45:59 AM WaterAPP: npm WARN old lockfile so supplemental metadata must be fetched from the registry.
1:45:59 AM WaterAPP: npm WARN old lockfile 
1:45:59 AM WaterAPP: npm WARN old lockfile This is a one-time fix-up, please be patient...
1:45:59 AM WaterAPP: npm WARN old lockfile 
1:49:07 AM WaterAPP: npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
1:49:08 AM WaterAPP: npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
1:49:11 AM WaterAPP: npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
1:49:20 AM WaterAPP: npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
1:49:36 AM WaterAPP: npm WARN deprecated workbox-cacheable-response@6.6.0: workbox-background-sync@6.6.0
1:50:25 AM WaterAPP: npm WARN deprecated react-google-login@5.2.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
1:50:31 AM WaterAPP: npm WARN deprecated express-graphql@0.12.0: This package is no longer maintained. We recommend using `graphql-http` instead. Please consult the migration document https://github.com/graphql/graphql-http#migrating-express-grpahql.
1:50:33 AM WaterAPP: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
1:54:43 AM WaterAPP: added 1426 packages, and audited 1427 packages in 9m
1:54:43 AM WaterAPP: 235 packages are looking for funding
1:54:43 AM WaterAPP:   run `npm fund` for details
1:54:43 AM WaterAPP: npm notice 
1:54:43 AM WaterAPP: 78 vulnerabilities (73 moderate, 5 high)
1:54:43 AM WaterAPP: npm notice New minor version of npm available! 9.5.1 -> 9.7.2
1:54:43 AM WaterAPP: npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.2>
1:54:44 AM WaterAPP: To address issues that do not require attention, run:
1:54:44 AM WaterAPP: npm notice Run `npm install -g npm@9.7.2` to update!
1:54:44 AM WaterAPP:   npm audit fix
1:54:44 AM WaterAPP: npm notice 
1:54:44 AM WaterAPP: To address all issues (including breaking changes), run:
1:54:44 AM WaterAPP:   npm audit fix --force
1:54:44 AM WaterAPP: Run `npm audit` for details.
1:54:44 AM WaterAPP: Running 'npm run build'...
1:54:47 AM WaterAPP: > waterapp@1.0.0 build
1:54:47 AM WaterAPP: > npm run build --prefix client
1:54:49 AM WaterAPP: > waterapp@0.1.0 build
1:54:49 AM WaterAPP: > react-scripts build
1:54:51 AM WaterAPP: node:internal/modules/cjs/loader:1078
1:54:51 AM WaterAPP:   throw err;
1:54:51 AM WaterAPP:   ^
🚨🚨🚨🚨🚨🚨1:54:51 AM WaterAPP: Error: Cannot find module '../scripts/build'🚨🚨🚨🚨🚨🚨
1:54:51 AM WaterAPP: Require stack:
1:54:51 AM WaterAPP: - /tmp/8db7c518c82d953/client/node_modules/.bin/react-scripts
1:54:51 AM WaterAPP:     at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
1:54:51 AM WaterAPP:     at Function.resolve (node:internal/modules/cjs/helpers:116:19)
1:54:52 AM WaterAPP:     at Object.<anonymous> (/tmp/8db7c518c82d953/client/node_modules/.bin/react-scripts:31:23)
1:54:52 AM WaterAPP:     at Module._compile (node:internal/modules/cjs/loader:1254:14)
1:54:52 AM WaterAPP:     at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
1:54:52 AM WaterAPP:     at Module.load (node:internal/modules/cjs/loader:1117:32)
1:54:52 AM WaterAPP:     at Module._load (node:internal/modules/cjs/loader:958:12)
1:54:52 AM WaterAPP:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
1:54:52 AM WaterAPP:     at node:internal/main/run_main_module:23:47 {
1:54:52 AM WaterAPP:   code: 'MODULE_NOT_FOUND',
1:54:52 AM WaterAPP:   requireStack: [ '/tmp/8db7c518c82d953/client/node_modules/.bin/react-scripts' ]
1:54:52 AM WaterAPP: }
1:54:52 AM WaterAPP: Node.js v18.16.0
1:54:52 AM WaterAPP: /bin/bash -c "oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 18 -p virtualenv_name= --log-file /tmp/build-debug.log  -i /tmp/8db7c518c82d953 -p compress_node_modules=tar-gz | tee /tmp/oryx-build.log ; exit $PIPESTATUS "
1:54:52 AM WaterAPP: Generating summary of Oryx build
1:54:53 AM WaterAPP: Parsing the build logs
1:54:53 AM WaterAPP: Found 0 issue(s)
1:54:53 AM WaterAPP: Build Summary :
1:54:53 AM WaterAPP: ===============
1:54:53 AM WaterAPP: Errors (0)
1:54:53 AM WaterAPP: Warnings (0)
1:54:54 AM WaterAPP: Deployment Failed. deployer = ms-azuretools-vscode deploymentPath = ZipDeploy. Extract zip.
1:55:35 AM WaterAPP: Deployment failed.

this seems to be the main obstacle: 🚨🚨🚨🚨🚨🚨1:54:51 AM WaterAPP: Error: Cannot find module '../scripts/build'🚨🚨🚨🚨🚨🚨

[2:07am]

frankcollins3 commented 1 year ago

proposed approaches: 1: there is a build folder within the project created in case amazonEC2 needed a build folder. Remove that build folder from scope but don't delete in case it's needed.

2: "scripts": { "server": "nodemon --quiet server", "client": "npm start --prefix client", "build": "npm run build --prefix client", "start": "serve -s client/build", "dev": "concurrently \"npm run server\" \"npm run client\"" },

1:54:49 AM WaterAPP: > react-scripts build 1:54:51 AM WaterAPP: node:internal/modules/cjs/loader:1078

chat(GPT) is insisting its module related but now I look at the scripts { } key in package.json looking @ the "start" key and the "build" key

vscode azureCLI tools output logs (from deployment): 1:54:51 AM WaterAPP: - /tmp/8db7c518c82d953/client/node_modules/.bin/react-scripts

"devDependencies": { "nodemon": "^2.0.22", "react-scripts": "^5.0.1" } }

[2:24am]

frankcollins3 commented 1 year ago

build module might be the build folder that it's looking for. this blog/article is the source of hope https://javascript.works-hub.com/learn/how-to-host-a-react-app-on-azure-10042

[2:35pm]

frankcollins3 commented 1 year ago

configure deployment source ----> [local, github, none]

Screen Shot 2023-07-04 at 2 36 08 AM

[2:37am]

very fast failure... the other 10 min+ deployment shows more signs of life (as in it mentions failing module errors)

Screen Shot 2023-07-04 at 2 40 27 AM

[2:40am]

frankcollins3 commented 1 year ago

upon attempt of deployment, whether fail or success, a "deployment" text? file is created with this statement:

[config] SCM_DO_BUILD_DURING_DEPLOYMENT=true

Screen Shot 2023-07-04 at 2 43 34 AM

Screen Shot 2023-07-04 at 2 43 44 AM

Screen Shot 2023-07-04 at 2 43 39 AM

it seems to suggest it could be redundant to have the build folder in the client directory. if DO_BUILD=true could be assuming and misinterpreting

[2:45am]