TripSit / website

3 stars 3 forks source link

Precautionary security patch. # Changes Made #147

Closed AlanaRm-rf-me closed 1 month ago

AlanaRm-rf-me commented 1 month ago

Updated .prettierrc file:

   {
     "tabWidth": 2,
     "useTabs": false,
     "endOfLine": "lf"
   }
  1. Added .editorconfig file:

    root = true
    
    [*]
    end_of_line = lf
    insert_final_newline = true
  2. Verified package.json contents:

    {
     "name": "website",
     "version": "0.1.0",
     "private": true,
     "scripts": {
       "## DOCKER ##": "",
       "website": "docker compose --file docker-compose.website.yml --project-name website up -d --force-recreate --build website",
       "logs": "docker container logs website -f -n 100",
       "lint": "next lint",
       "## LOCAL/CODESPACE ##": "",
       "dev": "NODE_OPTIONS='--inspect' next dev",
       "start": "next start",
       "build": "next build"
     },
     // ... rest of the file

Troubleshooting Steps

  1. Addressed Prettier errors related to line endings:

    • Updated .prettierrc to use LF line endings.
    • Added .editorconfig to enforce LF line endings.
    • Changed Git configuration to handle line endings consistently.
  2. Attempted to resolve "Missing script: "build"" error:

    • Verified that package.json contains the correct build script.
    • Suggested clearing npm cache and reinstalling dependencies:
      npm cache clean --force
      rm -rf node_modules package-lock.json
      npm install
  3. Addressed "ENOENT: no such file or directory, open 'D:\web.next\BUILD_ID'" error:

    • Suggested deleting the .next directory and rebuilding:
      rm -rf .next
      npm run build

Current Status

Next Steps to verify... as it works on my machine (tm)

  1. Verify that package.json changes are saved and recognized by npm:

    • Double-check file contents.
    • Try running npm run to list available scripts.
  2. Investigate why npm is not recognizing the build script:

    • Check for any error messages when running npm install.
    • Verify Node.js and npm versions match those specified in package.json:
      "engines": {
      "node": "v21.4.0",
      "npm": "10.2.4"
      }
  3. Debug the Next.js build process:

    • Run npm run build and capture the full output.
    • Check for any error messages or warnings during the build process.
  4. If issues persist, consider:

    • Creating a minimal Next.js project to compare configurations.
    • Updating Next.js and related dependencies to the latest compatible versions.
    • Checking for any conflicting global npm configurations.
  5. Fix the YAML syntax error in .drone.yml:

    • Remove or merge duplicate trigger sections.

y.

AlanaRm-rf-me commented 1 month ago

... fixing drastic errors, my workflow seemingly from another project decided to peek into this