blitz-js / legacy-framework

MIT License
2 stars 2 forks source link

Can't dockerise my app #8

Open romakoch opened 2 years ago

romakoch commented 2 years ago

What is the problem?

There is an error after trying to dockerize my app, using the official tutorial

Paste all your error logs here:

 > [builder 9/9] RUN yarn build:
blitz-js/blitz#16 2.810 yarn run v1.22.17
blitz-js/blitz#16 2.916 $ blitz build
blitz-js/blitz#16 4.021 Loaded env from /app/.env.local
blitz-js/blitz#16 4.022 Loaded env from /app/.env
blitz-js/blitz#16 4.738 /app/node_modules/esbuild/lib/main.js:1209
blitz-js/blitz#16 4.738         return callback(new Error(error), null);
blitz-js/blitz#16 4.738                         ^
blitz-js/blitz#16 4.738
blitz-js/blitz#16 4.738 Error: The service was stopped
blitz-js/blitz#16 4.738     at /app/node_modules/esbuild/lib/main.js:1209:25
blitz-js/blitz#16 4.738     at /app/node_modules/esbuild/lib/main.js:606:9
blitz-js/blitz#16 4.738     at Socket.afterClose (/app/node_modules/esbuild/lib/main.js:584:7)
blitz-js/blitz#16 4.738     at Socket.emit (node:events:402:35)
blitz-js/blitz#16 4.738     at endReadableNT (node:internal/streams/readable:1343:12)
blitz-js/blitz#16 4.738     at processTicksAndRejections (node:internal/process/task_queues:83:21)
blitz-js/blitz#16 4.738
blitz-js/blitz#16 4.738 Node.js v17.3.1
blitz-js/blitz#16 4.760 error Command failed with exit code 1.

Paste all relevant code snippets here:

PASTE_HERE (leave the ``` marks)

What are detailed steps to reproduce this?

1.

Run blitz -v and paste the output here:

PASTE_HERE (leave the ``` marks)

Please include below any other applicable logs and screenshots that show your problem:

No response

beerose commented 2 years ago

Hi, could you try with Node version 16 or lower?

Alfxjx commented 2 years ago

same error using node v16 successfully build in windows env but failed in docker

/usr/src/app/node_modules/esbuild/esbuild.exe: 1: /usr/src/app/node_modules/esbuild/esbuild.exe: MZ����@���: not found
/usr/src/app/node_modules/esbuild/esbuild.exe: 1: /usr/src/app/node_modules/esbuild/esbuild.exe: Syntax error: end of file unexpected (expecting ")")
Alfxjx commented 2 years ago

link-esbuild

this may help cause I copy the node_modules from outer to the docker

saamrezaei commented 1 year ago

Any updates on this?