Error: Connector configuration for nodejsConnector not found in edgio.config.js

Hi
nodejs : 18.x
When I tried to create property using Edgio Sites (Web-app hosting) , I got error like this.

***** Deployment Failed *************************************


Project build failed

Error: Connector configuration for nodejsConnector not found in edgio.config.js
at Object.buildCommand (C:\Users\park\dev\node_modules@edgio\connectors\frameworks\nodejs-connector\index.js:1:559)
at build (C:\Users\park\dev\node_modules@edgio\connectors\build.js:32:27)
at C:\Users\park\dev\node_modules@edgio\cli\utils\build.js:32:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Logger.step (C:\Users\park\dev\node_modules@edgio\cli\utils\logger.js:40:20)
at async build (C:\Users\park\dev\node_modules@edgio\cli\utils\build.js:30:3)
at async buildStep (C:\Users\park\dev\node_modules@edgio\cli\commands\deploy.js:252:13)
at async DeployCommand._wrappedRun (C:\Users\park\dev\node_modules@edgio\cli\commands\deploy.js:313:11)
at async DeployCommand.run (C:\Users\park\dev\node_modules@edgio\cli\commands\deploy.js:361:7)
at async exports.handler (C:\Users\park\dev\node_modules@edgio\cli\commands\deploy.js:557:3)

I tried it Linux and Mac, but results were same, failed.

Thanks

@park

Can you provide your package.json and edgio.config.js files here? This is the default one that gets created for a site using the generic Node.js connector:

// This file was automatically added by edgio init.
// You should commit this file to source control.
// Learn more about this file at https://docs.edg.io/guides/edgio_config
module.exports = {
  // The name of the site in Edgio to which this app should be deployed.
  // name: 'my-site-name',
  // The name of the organization in Edgio to which this app should be deployed.
  // organization: 'my-organization-name',
  // Overrides the default path to the routes file. The path should be relative to the root of your app.
  // routes: 'routes.js',
  // When set to true or omitted entirely, Edgio includes the deployment number in the cache key,
  // effectively purging the cache each time you deploy.
  // purgeCacheOnDeploy: false,
  // If you need to proxy some URLs to an origin instead of your Next.js app, you can configure the origins here:
  // origins: [
  //   {
  //     // The name of the backend origin
  //     name: "origin",
  //
  //     // When provided, the following value will be sent as the host header when connecting to the origin.
  //     // If omitted, the host header from the browser will be forwarded to the origin.
  //     override_host_header: "test-origin.edgio.net",
  //
  //     // The list of backend hosts
  //     hosts: [
  //       {
  //         // The domain name or IP address of the origin server
  //         location: "test-origin.edgio.net"
  //       }
  //     ]
  //   }
  // ],
  // Options for hosting serverless functions on Edgio
  // serverless: {
  //   // Set to true to include all packages listed in the dependencies property of package.json when deploying to Edgio.
  //   // This option generally isn't needed as Edgio automatically includes all modules imported by your code in the bundle that
  //   // is uploaded during deployment
  //   // includeNodeModules: true,
  //
  //   // Include additional paths that are dynamically loaded by your app at runtime here when building the serverless bundle.
  //   // include: ['views/**/*'],
  // },
  // The maximum number of URLs that will be concurrently prerendered during deployment when static prerendering is enabled.
  // Defaults to 200, which is the maximum allowed value.
  // prerenderConcurrency: 200,
  // A list of glob patterns identifying which prerenderConcurrency source files should be uploaded when running edgio deploy --includeSources.
  // This option is primarily used to share source code with Edgio support personnel for the purpose of debugging. If omitted,
  // edgio deploy --includeSources will result in all files which are not gitignored being uploaded to Edgio.
  //
  // sources : [
  //   '**/*', // include all files
  //   '!(**/secrets/**/*)', // except everything in the secrets directory
  // ],
  connector: '@edgio/nodejs-connector',

  nodejsConnector: {
    buildFolder: "",
    entryFile: "",
    staticFolder: "",
    envPort: "",
    buildCommand: "",
    devCommand: "",
    devReadyMessageOrTimeout: 0
  }
}

module.exports = {
connector: “@edgio/nodejs-connector”,

// The name of the site in Edgio to which this app should be deployed.
// The name of the organization in Edgio to which this app should be deployed.
// organization: ‘my-organization-name’,
// Overrides the default path to the routes file. The path should be relative to the root of your app.
// routes: ‘routes.js’,
// When set to true or omitted entirely, Edgio includes the deployment number in the cache key,
// effectively purging the cache each time you deploy.
// purgeCacheOnDeploy: false,
// If you need to proxy some URLs to an origin instead of your Next.js app, you can configure the origins here:
// origins: [
// {
// // The name of the backend origin
// name: “origin”,
//
// // When provided, the following value will be sent as the host header when connecting to the origin.
// // If omitted, the host header from the browser will be forwarded to the origin.
// override_host_header: “test-origin.edgio.net”,
//
// // The list of backend hosts
// hosts: [
// {
// // The domain name or IP address of the origin server
// location: “test-origin.edgio.net
// }
// ]
// }
// ],
// Options for hosting serverless functions on Edgio
// serverless: {
// // Set to true to include all packages listed in the dependencies property of package.json when deploying to Edgio.
// // This option generally isn’t needed as Edgio automatically includes all modules imported by your code in the bundle that
// // is uploaded during deployment
// // includeNodeModules: true,
//
// // Include additional paths that are dynamically loaded by your app at runtime here when building the serverless bundle.
// // include: [‘views//*'],
// },
// The maximum number of URLs that will be concurrently prerendered during deployment when static prerendering is enabled.
// Defaults to 200, which is the maximum allowed value.
// prerenderConcurrency: 200,
// A list of glob patterns identifying which prerenderConcurrency source files should be uploaded when running edgio deploy --includeSources.
// This option is primarily used to share source code with Edgio support personnel for the purpose of debugging. If omitted,
// edgio deploy --includeSources will result in all files which are not gitignored being uploaded to Edgio.
//
// sources : [
// '
/', // include all files
// '!(/secrets//
)’, // except everything in the secrets directory
// ],
name: “test”,

nodejsConnector: {
buildFolder: “”,
entryFile: “”,
staticFolder: “”,
envPort: “”,
buildCommand: “”,
devCommand: “”,
devReadyMessageOrTimeout: 0
}
};

This might be a bug in later versions of our CLI. I have been able to reproduce the issue in 7.6.0 and later. Could you try deploying using an older version of the packages?

edgio use 7.4.0
edgio deploy

Are you working with a specific framework where you intend to run your application using our Node.js connector. It appears later versions of our CLI require the nodeConnector.entryPoint file to be defined, which is what we use to launch the production build of your SSR app. If you’re not using that, or only trying to deploy a site that has static files, then we can find a different workaround for the issue. I am waiting to hear back from our dev team about this behavior we’re experiencing.

edgio 7.4.0 is not available.

t# edgio use ~7.4.0

Updating Edgio

Current: ^7.8.0
New: ~7.4.0
:heavy_multiplication_x: installing @edgio/cli, @edgio/connectors, @edgio/core, @edgio/prefetch… failed.

Error: Process exited with code 1.
npm ERR! code ETARGET

npm ERR! notarget No matching version found for @edgio/connectors@~7.4.0.

npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn’t exist.

npm
ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-14T07_28_16_860Z-debug-0.log

at ChildProcess.<anonymous> (/mnt/d/dev/test/node_modules/@edgio/cli/utils/run.js:30:16)
at ChildProcess.emit (node:events:517:28)
at ChildProcess._handle.onexit (node:internal/child_process:292:12)

root@DESKTOP-28RJ0H0:/mnt/d/dev/test# node -v
v18.19.0

I tried node 18.x and 20.x both, but all failed.

:clipboard: Deploying to:

Organization: Private space
Property: test
Environment: default
Edgio version: 7.8.0
Cloud runtime: nodejs20.x
Purge cache on deploy: default
Deployment #4

:hammer_and_wrench: Building your app for deployment on Edgio

***** Deployment Failed *************************************


Project build failed

Error: Connector configuration for nodejsConnector not found in edgio.config.js

Have you tested it yourself ?

I have tested myself, and I get a similar error, but not that exact one. This is what I get:

2024-02-13T19:02:52Z - error - external - Error: Failed to invoke serverless function with error: {
  "errorType": "Error",
  "errorMessage": "Connector configuration for nodejsConnector is missing an 'entryFile' value.",
  "trace": [
    "Error: Connector configuration for nodejsConnector is missing an 'entryFile' value.",
    "    at Object.prodCommand 

Would you be able to put your code in a repo or see if it can be zipped (exclude node_modules and .edgio dirs) and attached here for me to test?

After I mentioned about using an older version of the CLI packages, I remember that 7.6.0 introduced the @edgio/connectors package so downgrading would fail.

No. I didn’t write any code, I just tried to deploy as it says in the manual. Maybe you can create any account on your own and try and get the same result.

@park Hello,
sorry for the inconvenience using Edgio Sites. This bug should be fixed in the next version
of @edgio/connectors that will come out next week.

In the meantime, could you please try the release-candidate version
and see if it solves your issue?

Follow the steps:

rm -rf node_modules
npx edgio use 7.8.1-rc-1708007539-544c1f47.0
npx edgio deploy

Hi @hansys ,
I try to deploy edgio using the Svelte framework. then I face this error. Is it the same error in this post and I have to wait for the next version?
I tried version 7.8.1-rc-1708007539-544c1f47.0 but it still error.

Thank you.

@tuanrealx Hey, I’ve also been able to reproduce this bug. Thank you for reporting it.
Please try our latest version 7.8.1 that should address both mentioned issues.

Follow the steps:

npx edgio use 7.8.1
npx edgio deploy
1 Like