B-AROL-O / ble-testsuite

Automated test suite for Bluetooth Low Energy devices
https://ble-testsuite.netlify.app
MIT License
1 stars 1 forks source link

(WIP) feat: Apply Next.js Blog Theme #6

Open gmacario opened 1 year ago

gmacario commented 1 year ago

Template available at https://github.com/netlify-templates/nextjs-blog-theme

See demo at https://bejamas-nextjs-blog.netlify.app/

netlify[bot] commented 1 year ago

Deploy Preview for ble-testsuite failed.

Name Link
Latest commit 3127d18466f3e1ce7ffff4b48824c6c08af6b8f7
Latest deploy log https://app.netlify.com/sites/ble-testsuite/deploys/647f82270f209f0008204ceb
gmacario commented 1 year ago

From https://app.netlify.com/sites/ble-testsuite/deploys/645f8263149a8300088739ba

image

Deploy summary

Plugin "netlify-plugin-cypress" failed

Error: Failed to install Cypress. Did you forget to add Cypress as a dev dependency?
Command failed with ENOENT: cypress install
spawn cypress ENOENT
gmacario commented 1 year ago

Deploy log from https://app.netlify.com/sites/ble-testsuite/deploys/645f8263149a8300088739ba

2:28:23 PM: build-image version: 340a5296c836ef3d99ac1d871c6447bb7a417c33 (focal)
2:28:23 PM: buildbot version: 20d735efc756356fd09bbc43982bef2018461b10
2:28:23 PM: Fetching cached dependencies
2:28:23 PM: Starting to download cache of 61.1MB
2:28:24 PM: Finished downloading cache in 618ms
2:28:24 PM: Starting to extract cache
2:28:24 PM: Finished extracting cache in 332ms
2:28:24 PM: Finished fetching cache in 1.019s
2:28:24 PM: Starting to prepare the repo for build
2:28:25 PM: Preparing Git Reference pull/6/head
2:28:26 PM: Parsing package.json dependencies
2:28:26 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'docs/.next' versus '/' in the Netlify UI
2:28:26 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'npm run build' versus 'true' in the Netlify UI
2:28:27 PM: Starting to install dependencies
2:28:27 PM: Python version set to 3.8
2:28:27 PM: Attempting Ruby version 2.7.2, read from environment
2:28:27 PM: Using Ruby version 2.7.2
2:28:28 PM: Started restoring cached go cache
2:28:28 PM: Finished restoring cached go cache
2:28:28 PM: Installing Go version 1.19.5 (requested 1.19.5)
2:28:32 PM: go version go1.19.5 linux/amd64
2:28:32 PM: Using PHP version 8.0
2:28:33 PM: Started restoring cached Node.js version
2:28:34 PM: Finished restoring cached Node.js version
2:28:34 PM: v16.20.0 is already installed.
2:28:34 PM: Now using node v16.20.0 (npm v8.19.4)
2:28:34 PM: Enabling Node.js Corepack
2:28:34 PM: Started restoring cached build plugins
2:28:34 PM: Finished restoring cached build plugins
2:28:34 PM: Install dependencies script success
2:28:34 PM: Starting build script
2:28:35 PM: Detected 1 framework(s)
2:28:35 PM: "next" at version "unknown"
2:28:35 PM: Section completed: initializing
2:28:36 PM: ​
2:28:36 PM: Netlify Build                                                 
2:28:36 PM: ────────────────────────────────────────────────────────────────
2:28:36 PM: ​
2:28:36 PM: ❯ Version
2:28:36 PM:   @netlify/build 29.11.2
2:28:36 PM: ​
2:28:36 PM: ❯ Flags
2:28:36 PM:   baseRelDir: true
2:28:36 PM:   buildId: 645f8263149a8300088739b8
2:28:36 PM:   deployId: 645f8263149a8300088739ba
2:28:36 PM: ​
2:28:36 PM: ❯ Current directory
2:28:36 PM:   /opt/build/repo/docs
2:28:36 PM: ​
2:28:36 PM: ❯ Config file
2:28:36 PM:   /opt/build/repo/netlify.toml
2:28:36 PM: ​
2:28:36 PM: ❯ Context
2:28:36 PM:   deploy-preview
2:28:37 PM: ​
2:28:37 PM: ❯ Installing plugins
2:28:37 PM:    - netlify-plugin-cypress@2.2.0
2:28:50 PM: ​
2:28:50 PM: ❯ Loading plugins
2:28:50 PM:    - netlify-plugin-cypress@2.2.0 from netlify.toml
2:28:51 PM: ​
2:28:51 PM: netlify-plugin-cypress (onPreBuild event)                     
2:28:51 PM: ────────────────────────────────────────────────────────────────
2:28:51 PM: ​
2:28:51 PM: Failed to install Cypress
2:28:51 PM: Did you forget to add Cypress as a dev dependency?
2:28:51 PM:   npm i -D cypress
2:28:51 PM: or
2:28:51 PM:  yarn add -D cypress
2:28:51 PM: See https://github.com/cypress-io/netlify-plugin-cypress#readme
2:28:51 PM: ​
2:28:51 PM: Plugin "netlify-plugin-cypress" failed                        
2:28:51 PM: ────────────────────────────────────────────────────────────────
2:28:51 PM: ​
2:28:51 PM:   Error message
2:28:51 PM:   Error: Failed to install Cypress. Did you forget to add Cypress as a dev dependency?
2:28:51 PM:   Command failed with ENOENT: cypress install
2:28:51 PM:   spawn cypress ENOENT
2:28:51 PM: ​
2:28:51 PM:   Plugin details
2:28:52 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
2:28:51 PM:   Package:        netlify-plugin-cypress
2:28:51 PM:   Version:        2.2.0
2:28:51 PM:   Repository:     git+https://github.com/cypress-io/netlify-plugin-cypress.git
2:28:51 PM:   npm link:       https://www.npmjs.com/package/netlify-plugin-cypress
2:28:51 PM:   Report issues:  https://github.com/cypress-io/netlify-plugin-cypress/issues
2:28:51 PM: ​
2:28:51 PM:   Error location
2:28:51 PM:   In "onPreBuild" event in "netlify-plugin-cypress" from netlify.toml
2:28:51 PM: ​
2:28:51 PM:   Resolved config
2:28:51 PM:   build:
2:28:51 PM:     base: /opt/build/repo/docs
2:28:51 PM:     command: npm run build
2:28:51 PM:     commandOrigin: config
2:28:51 PM:     environment:
2:28:51 PM:       - REVIEW_ID
2:28:51 PM:       - CYPRESS_CACHE_FOLDER
2:28:51 PM:       - TERM
2:28:51 PM:     publish: /opt/build/repo/docs/.next
2:28:51 PM:     publishOrigin: config
2:28:51 PM:   plugins:
2:28:51 PM:     - inputs:
2:28:51 PM:         record: true
2:28:51 PM:       origin: config
2:28:51 PM:       package: netlify-plugin-cypress
2:28:52 PM: Caching artifacts
2:28:52 PM: Started saving build plugins
2:28:52 PM: Finished saving build plugins
2:28:52 PM: Started saving pip cache
2:28:52 PM: Finished saving pip cache
2:28:52 PM: Started saving emacs cask dependencies
2:28:52 PM: Finished saving emacs cask dependencies
2:28:52 PM: Started saving maven dependencies
2:28:52 PM: Finished saving maven dependencies
2:28:52 PM: Started saving boot dependencies
2:28:52 PM: Finished saving boot dependencies
2:28:52 PM: Started saving rust rustup cache
2:28:52 PM: Finished saving rust rustup cache
2:28:52 PM: Started saving go dependencies
2:28:52 PM: Finished saving go dependencies
2:28:52 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:28:52 PM: Failing build: Failed to build site
2:28:52 PM: Finished processing build request in 29.09s
gmacario commented 1 year ago

With reference to the error in the Netlify Deploy log

2:28:51 PM: Failed to install Cypress
2:28:51 PM: Did you forget to add Cypress as a dev dependency?
2:28:51 PM:   npm i -D cypress
2:28:51 PM: or
2:28:51 PM:  yarn add -D cypress
2:28:51 PM: See https://github.com/cypress-io/netlify-plugin-cypress#readme

As a matter of fact, "cypress": "^10.1.0" was listed in section "dependencies", not "devDependencies". Fixing and installing the latest version:

gmaca@alpha MINGW64 /e/data/gmaca/github/gmacario/ble-testsuite (feat/nextjs-blog)
$ npm i -D cypress
npm WARN idealTree Removing dependencies.cypress in favor of devDependencies.cypress

changed 3 packages, and audited 1045 packages in 2m

252 packages are looking for funding
  run `npm fund` for details        

16 vulnerabilities (8 moderate, 8 high)

To address issues that do not require attention, run:   
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

gmaca@alpha MINGW64 /e/data/gmaca/github/gmacario/ble-testsuite (feat/nextjs-blog)
$ git diff -- package.json
diff --git a/package.json b/package.json
index f13c87b..c004c4c 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,6 @@
     "@mapbox/rehype-prism": "^0.8.0",
     "@tailwindcss/typography": "^0.5.0",
     "classnames": "^2.3.1",
-    "cypress": "^10.1.0",
     "gray-matter": "^4.0.2",
     "next": "latest",
     "next-mdx-remote": "^4.1.0",
@@ -36,6 +35,7 @@
   },
   "devDependencies": {
     "autoprefixer": "^10.4.0",
+    "cypress": "^12.12.0",
     "eslint": "<9.0.0",
     "eslint-config-next": "12.3.4",
     "eslint-config-prettier": "^8.3.0",

gmaca@alpha MINGW64 /e/data/gmaca/github/gmacario/ble-testsuite (feat/nextjs-blog)
$
gmacario commented 1 year ago

Just for test I added a new site on https://app.netlify.com/

and everything worked automagically!

Site overview: https://app.netlify.com/sites/ble-testsuite-next/overview

image

Public link: https://ble-testsuite-next.netlify.app/

image

gmacario commented 1 year ago

Let us keep the PR open until we complete integrating the existing Markdown pages. and perhaps simplify the theme a little bit.

I will adjust the linked Site configuration in Netlify just after the PR is merged.

netlify[bot] commented 1 year ago

Deploy Preview for ble-testsuite-next ready!

Name Link
Latest commit 3127d18466f3e1ce7ffff4b48824c6c08af6b8f7
Latest deploy log https://app.netlify.com/sites/ble-testsuite-next/deploys/647f82299dbf120008b468f0
Deploy Preview https://deploy-preview-6--ble-testsuite-next.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.