DTLab-LabCN / DTT-mDL-Testing

0 stars 0 forks source link

Unable to `npm run build` when NODE_ENV=production #4

Closed pruneau628 closed 1 month ago

pruneau628 commented 1 month ago

It's commented out in the docker build file, because it triggers the following error:

# export NODE_ENV=production
# npm run build

> orbit-mdl-webverifier@0.1.0 build
> vite build

failed to load config from /home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/vite.config.js
error during build:
Error: Cannot find module '@esbuild-plugins/node-globals-polyfill'
Require stack:
- /home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/vite.config.js
- /home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/node_modules/vite/dist/node/chunks/dep-b2890f90.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/vite.config.js:112:44)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at _require.extensions.<computed> [as .js] (file:///home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/node_modules/vite/dist/node/chunks/dep-b2890f90.js:66359:24)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)

@NimeshNB, please advise.

NimeshNB commented 1 month ago

It's commented out in the docker build file, because it triggers the following error:

# export NODE_ENV=production
# npm run build

> orbit-mdl-webverifier@0.1.0 build
> vite build

failed to load config from /home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/vite.config.js
error during build:
Error: Cannot find module '@esbuild-plugins/node-globals-polyfill'
Require stack:
- /home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/vite.config.js
- /home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/node_modules/vite/dist/node/chunks/dep-b2890f90.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/vite.config.js:112:44)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at _require.extensions.<computed> [as .js] (file:///home/bruno/dev/github/DTLab-LabCN/DTT-mDL-Testing/node_modules/vite/dist/node/chunks/dep-b2890f90.js:66359:24)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)

@NimeshNB, please advise.

Yes i'll check this

pruneau628 commented 1 month ago

Corrected by https://github.com/DTLab-LabCN/DTT-mDL-Testing/pull/13, thanks !