Having error with deploy full stack web with some local images

Hi everyone,

I’m trying to deploy my MERN project, everything works locally in production mode.
But I get below error no matter I changed the images url to relative or absolute
I import some images from local in /src/utils/links.jsx.

RollupError: Could not resolve “./assets/category/electronics/computer-&-tech.png” from “src/utils/links.jsx”
Mar 10 08:23:23 PM at error (file:///opt/render/project/src/client/node_modules/rollup/dist/es/shared/node-entry.js:2125:30)
Mar 10 08:23:23 PM at ModuleLoader.handleInvalidResolvedId (file:///opt/render/project/src/client/node_modules/rollup/dist/es/shared/node-entry.js:23776:24)

here is my file structure


I have images in cars, electronics, fashion, toy folder

I tried to comment out all my images, build successfully then I run in to another error,

Mar 10 11:54:26 PM ==> Starting service with ‘cd server && node server.js’
Mar 10 11:54:35 PM /opt/render/project/src/server/node_modules/passport-oauth2/lib/strategy.js:87
Mar 10 11:54:35 PM if (!options.clientID) { throw new TypeError(‘OAuth2Strategy requires a clientID option’); }
Mar 10 11:54:35 PM ^
Mar 10 11:54:35 PM
Mar 10 11:54:35 PM TypeError: OAuth2Strategy requires a clientID option
Mar 10 11:54:35 PM at Strategy.OAuth2Strategy (/opt/render/project/src/server/node_modules/passport-oauth2/lib/strategy.js:87:34)
Mar 10 11:54:35 PM at new Strategy (/opt/render/project/src/server/node_modules/passport-google-oauth20/lib/strategy.js:52:18)
Mar 10 11:54:35 PM at file:///opt/render/project/src/server/passport.js:8:3
Mar 10 11:54:35 PM at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
Mar 10 11:54:35 PM at async Loader.import (internal/modules/esm/loader.js:177:24)
Mar 10 11:54:35 PM at async Object.loadESM (internal/process/esm_loader.js:68:5)

Here is how I setup my passport.js, there is Client ID and I checked that I setup the env variables on render

import passport from "passport"
import { Strategy as GoogleStrategy } from "passport-google-oauth20"
import "dotenv/config.js"
import User from "./models/userModel.js"
import uploadPhoto from "./utils/uploadPhoto.js"

passport.use(
  new GoogleStrategy(
    {
      clientID: process.env.CLIENT_ID,
      clientSecret: process.env.CLIENT_SECRET,
      callbackURL: process.env.GOOGLE_CALLBACK_URL,
    },
    async function (accessToken, refreshToken, profile, done) {
      ...
  )
)

Thanks for help!

Hey Joe,

Are you still seeing the issue today?

Regards.
Jérémy, Render Support