Deployment not working with Mongoose and Express

Hello everyone,

I’ve created an api for an e-commerce website (marvelous-naiad-626528 on Netlify) with Mongoose and Express, but I’m really struggling with its deployment. I looked in different places and followed what I learned but it’s still not working.

Some help would be much appreciated! :pray:

Here are my files : https://github.com/YoannBretonnet/e-commerce-api

And here is the log content :

11:44:53 AM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
11:44:53 AM: [1/4] Resolving packages…
11:44:54 AM: warning netlify-lambda > webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents 1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
11:44:54 AM: [2/4] Fetching packages…
11:45:05 AM: [3/4] Linking dependencies…
11:45:05 AM: warning “netlify-cli > netlify/build > ts-node 10.8.1” has unmet peer dependency " types/node ".
11:45:09 AM: [4/4] Building fresh packages…
11:45:13 AM: success Saved lockfile.
11:45:13 AM: Done in 20.63s.
11:45:13 AM: npm packages installed using Yarn
11:45:14 AM: Install dependencies script success
11:45:14 AM: Starting build script
11:45:14 AM: Detected 0 framework(s)
11:45:14 AM: Section completed: initializing
11:45:16 AM:
11:45:16 AM: Netlify Build
11:45:16 AM: ────────────────────────────────────────────────────────────────
11:45:16 AM:
11:45:16 AM: ❯ Version
11:45:16 AM: netlify/build 29.9.2
11:45:16 AM:
11:45:16 AM: ❯ Flags
11:45:16 AM: baseRelDir: true
11:45:16 AM: buildId: 64464f875860292bfbad15c8
11:45:16 AM: deployId: 64464f875860292bfbad15ca
11:45:16 AM:
11:45:16 AM: ❯ Current directory
11:45:16 AM: /opt/build/repo
11:45:16 AM:
11:45:16 AM: ❯ Config file
11:45:16 AM: /opt/build/repo/netlify.toml
11:45:16 AM:
11:45:16 AM: ❯ Context
11:45:16 AM: production
11:45:16 AM:
11:45:16 AM: 1. Build command from Netlify app
11:45:16 AM: ────────────────────────────────────────────────────────────────
11:45:16 AM:
11:45:16 AM: $ yarn build
11:45:16 AM: yarn run v1.22.19
11:45:16 AM: $ ./node_modules/.bin/netlify-lambda build src
11:45:16 AM: netlify-lambda: Building functions
11:45:24 AM: [
11:45:24 AM: ModuleParseError: Module parse failed: Cannot use keyword ‘await’ outside an async function (95:26)
11:45:24 AM: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
11:45:24 AM: | return nodeJsByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
11:45:24 AM: | }
11:45:24 AM: > const nodejsRandomBytes = await (async () => {
11:45:24 AM: | try {
11:45:24 AM: | return (await import(‘crypto’)).randomBytes;
11:45:24 AM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19)
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
11:45:24 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
11:45:24 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
11:45:24 AM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
11:45:24 AM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16
11:45:24 AM: at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3),
11:45:24 AM: ModuleParseError: Module parse failed: Unexpected token (107:28)
11:45:24 AM: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
11:45:24 AM: | this.connectionId = connectionId;
11:45:24 AM: | this.duration = duration;
11:45:24 AM: > this.reply = reply ?? {};
11:45:24 AM: | }
11:45:24 AM: | }
11:45:24 AM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19)
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
11:45:24 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
11:45:24 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
11:45:24 AM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
11:45:24 AM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16
11:45:24 AM: at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3),
11:45:24 AM: ModuleParseError: Module parse failed: Unexpected token (10:32)
11:45:24 AM: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
11:45:24 AM: | constructor(parent, command, options) {
11:45:24 AM: | super(parent, options);
11:45:24 AM: > this.options = options ?? {};
11:45:24 AM: | this.command = command;
11:45:24 AM: | }
11:45:24 AM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19)
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
11:45:24 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
11:45:24 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
11:45:24 AM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
11:45:24 AM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16
11:45:24 AM: at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3),
11:45:24 AM: ModuleParseError: Module parse failed: Unexpected token (112:32)
11:45:24 AM: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
11:45:24 AM: | constructor(collection, query, options) {
11:45:24 AM: | super(collection, options);
11:45:24 AM: > this.options = options ?? {};
11:45:24 AM: | this.cmdBase = {
11:45:24 AM: | remove: false,
11:45:24 AM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19)
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
11:45:24 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
11:45:24 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
11:45:24 AM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
11:45:24 AM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16
11:45:24 AM: at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3),
11:45:24 AM: ModuleParseError: Module parse failed: Unexpected token (28:54)
11:45:24 AM: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
11:45:24 AM: | * see specifications/read-write-concern.rst at master · mongodb/specifications · GitHub
11:45:24 AM: | /
11:45:24 AM: > this.level = exports.ReadConcernLevel[level] ?? level;
11:45:24 AM: | }
11:45:24 AM: | /
at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19) at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5 at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12 at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3), ModuleParseError: Module parse failed: Unexpected token (32:69) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. | this.readPreference = this.hasAspect(exports.Aspect.WRITE_OPERATION) | ? read_preference_1.ReadPreference.primary > : read_preference_1.ReadPreference.fromOptions(options) ?? read_preference_1.ReadPreference.primary; | // Pull the BSON serialize options from the already-resolved options | this.bsonOptions = (0, bson_1.resolveBSONOptions)(options); at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19) at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5 at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12 at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3), ModuleParseError: Module parse failed: Unexpected token (39:29) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. | this.mode = mode; | this.tags = tags; > this.hedge = options?.hedge; | this.maxStalenessSeconds = undefined; | this.minWireVersion = undefined; at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19) at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5 at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12 at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3), ModuleParseError: Module parse failed: Unexpected token (43:27) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. | if (options == null) | return undefined; > inherit = inherit ?? {}; | let opts; | if (typeof options === ‘string’ || typeof options === ‘number’) { at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19) at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5 at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12 at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3), ModuleParseError: Module parse failed: Unexpected token (44:48) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. | } | this.srvHost = options.srvHost; > this.srvMaxHosts = options.srvMaxHosts ?? 0; | this.srvServiceName = options.srvServiceName ?? ‘mongodb’; | this.rescanSrvIntervalMS = 60000; at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19) at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5 at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12 at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3), ModuleParseError: Module parse failed: Unexpected token (46:33) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. | /
11:45:24 AM: | function resolveBSONOptions(options, parent) {
11:45:24 AM: > const parentOptions = parent?.bsonOptions;
11:45:24 AM: | return {
11:45:24 AM: | raw: options?.raw ?? parentOptions?.raw ?? false,
11:45:24 AM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19)
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
11:45:24 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
11:45:24 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
11:45:24 AM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
11:45:24 AM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16
11:45:24 AM: at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3),
11:45:24 AM: ModuleParseError: Module parse failed: Unexpected token (52:38)
11:45:24 AM: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
11:45:24 AM: | }
11:45:24 AM: | get id() {
11:45:24 AM: > return this[kId] ?? undefined;
11:45:24 AM: | }
11:45:24 AM: | /
* internal */
11:45:24 AM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:469:19)
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
11:45:24 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
11:45:24 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
11:45:24 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
11:45:24 AM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
11:45:24 AM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
11:45:24 AM: at /opt/build/repo/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:123:16
11:45:24 AM: at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
11:45:24 AM: ]
11:45:24 AM: error Command failed with exit code 1. (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
11:45:24 AM: info Visit yarn run | Yarn for documentation about this command.
11:45:24 AM:
11:45:24 AM: “build.command” failed
11:45:24 AM: ────────────────────────────────────────────────────────────────
11:45:24 AM:
11:45:24 AM: Error message
11:45:24 AM: Command failed with exit code 1: yarn build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
11:45:24 AM:
11:45:24 AM: Error location
11:45:24 AM: In Build command from Netlify app:
11:45:24 AM: yarn build
11:45:24 AM:
11:45:24 AM: Resolved config
11:45:24 AM: build:
11:45:24 AM: command: yarn build
11:45:24 AM: commandOrigin: ui
11:45:24 AM: publish: /opt/build/repo/dist
11:45:24 AM: publishOrigin: ui
11:45:24 AM: functionsDirectory: /opt/build/repo/functions
11:45:25 AM: Caching artifacts

Hiya, sorry you are having trouble with your site.

Can you give this support guide a read and see if this helps:

https://answers.netlify.com/t/support-guide-compiled-build-and-deploy-

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!

Hi there!
Thank you for your response. Unfortunately I don’t have access to the link you shared… Is there a way for me to get access?

Cheers,

Here you go: [Support Guide] Compiled Build and Deploy Resources -- start here!

Sorry about that. See if this documentation can help.

Hi, I’ve tried several things, but still not working…

I tried the command “build”: “netlify-lambda build src” but I’ve got this Error message: Command failed with exit code 1: netlify-lambda build src

I tried these commands : “build”: “npm run build” and “build”: “npm run webpack”. The site is deployed but then with the link https://marvelous-naiad-626528.netlify.app/.netlify/functions/api, the page is not found.

Here is my build settings :

My package.json:

{
“name”: “ecommerceapi”,
“version”: “1.0.0”,
“description”: “”,
“main”: “api.js”,
“scripts”: {
“start”: “nodemon ./src/api.js”,
“build”: “npm run build”
},
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“cors”: “^2.8.5”,
“crypto-js”: “^4.1.1”,
“dotenv”: “^16.0.3”,
“express”: “^4.18.2”,
“jsonwebtoken”: “^9.0.0”,
“mongoose”: “^7.0.3”,
“netlify-cli”: “^14.1.0”,
“netlify-lambda”: “^2.0.16”,
“nodemon”: “^2.0.22”,
“serverless-http”: “^3.2.0”,
“stripe”: “^11.16.0”
}
}

And here is the message with debug:

2:49:07 PM: build-image version: 68a2c262fa3c95a08a1716b8dde8fba0e332ec73 (focal)

2:49:07 PM: buildbot version: b549e06c0b968ceb54ca53dc179c6fe57df02730

2:49:07 PM: Building without cache

2:49:07 PM: Starting to prepare the repo for build

2:49:07 PM: No cached dependencies found. Cloning fresh repo

2:49:07 PM: git clone --filter=blob:none

2:49:08 PM: Preparing Git Reference refs/heads/main

2:49:08 PM: Parsing package.json dependencies

2:49:09 PM:

❯ Initial build environment

baseRelDir: true

branch: main

context: production

cwd: /opt/build/repo

featureFlags:

mode: buildbot

repositoryRoot: /opt/build/repo

siteId: 5d970f82-b75c-4e07-83c8-342ed43ef2ff

❯ UI build settings

baseRelDir: true

build:

environment:

  • NETLIFY_BUILD_DEBUG

publish: dist/

❯ Resolved build environment

branch: main

buildDir: /opt/build/repo

configPath: /opt/build/repo/netlify.toml

context: production

env:

❯ Resolved config

build:

environment:

  • NETLIFY_BUILD_DEBUG

publish: /opt/build/repo/dist

publishOrigin: ui

functionsDirectory: /opt/build/repo/functions

2:49:10 PM: Starting to install dependencies

2:49:10 PM: Python version set to 3.8

2:49:10 PM: Attempting Ruby version 2.7.2, read from environment

2:49:10 PM: Using Ruby version 2.7.2

2:49:11 PM: Started restoring cached go cache

2:49:11 PM: Finished restoring cached go cache

2:49:11 PM: Installing Go version 1.19.5 (requested 1.19.5)

2:49:16 PM: go version go1.19.5 linux/amd64

2:49:16 PM: Using PHP version 8.0

2:49:17 PM: v16.20.0 is already installed.

2:49:18 PM: Now using node v16.20.0 (npm v8.19.4)

2:49:18 PM: Enabling Node.js Corepack

2:49:18 PM: Started restoring cached build plugins

2:49:18 PM: Finished restoring cached build plugins

2:49:18 PM: Started restoring cached corepack dependencies

2:49:18 PM: Finished restoring cached corepack dependencies

2:49:18 PM: Started restoring cached yarn cache

2:49:18 PM: Finished restoring cached yarn cache

2:49:18 PM: No yarn workspaces detected

2:49:18 PM: Started restoring cached node modules

2:49:18 PM: Finished restoring cached node modules

2:49:18 PM: Installing npm packages using Yarn version 1.22.19

2:49:19 PM: yarn install v1.22.19

2:49:19 PM: [1/4] Resolving packages…

2:49:20 PM: warning netlify-lambda > webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2

2:49:20 PM: [2/4] Fetching packages…

2:49:35 PM: [3/4] Linking dependencies…

2:49:35 PM: warning “netlify-cli > @netlify/build > ts-node@10.8.1” has unmet peer dependency “@types/node@*”.

2:49:40 PM: [4/4] Building fresh packages…

2:49:44 PM: success Saved lockfile.

2:49:44 PM: Done in 25.74s.

2:49:44 PM: npm packages installed using Yarn

2:49:45 PM: Install dependencies script success

2:49:45 PM: No build steps found, continuing to publishing

2:49:45 PM: Starting to deploy site from ‘dist’

2:49:45 PM: Calculating files to upload

2:49:45 PM: Starting post processing

2:49:45 PM: 0 new files to upload

2:49:45 PM: 0 new functions to upload

2:49:45 PM: Section completed: deploying

2:49:45 PM: Post processing - HTML

2:49:45 PM: Section completed: building

2:49:45 PM: Post processing - header rules

2:49:45 PM: Post processing - redirect rules

2:49:45 PM: Post processing done

2:49:45 PM: Section completed: postprocessing

2:49:46 PM: Uploading Cache of size 510.6KB

2:49:46 PM: Section completed: cleanup

2:49:46 PM: Finished processing build request in 38.914s

2:49:46 PM: Site is live :sparkles:

netlify-lambda has been deprecated for a long time now and should not be used. Netlify automatically bundles functions for you. Simply follow the steps mentioned in the docs: Functions overview | Netlify Docs

Netlify is not meant for Express hosting without Netlify Functions. Here’s an example of how to use Express with Netlify Functions: netlify-file-browser/api.js at v2 · Hrishikesh-K/netlify-file-browser · GitHub