clonei um projeto front-end pra conectar ao projeto da trilha de django conforme as aulas.
e ao rodar o comando docker-compose up --build ... recebo o seguinte erro:
=> ERROR [nginx builder 4/4] RUN npm run build 1.2s
[nginx builder 4/4] RUN npm run build: 0.889 0.889 > app-react@0.0.0 build 0.889 > vite build 0.889 1.090 /app/node_modules/rollup/dist/native.js:64 1.090 throw new Error( 1.090 ^ 1.090 1.090 Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try
npm i
again after removing both package-lock.json and node_modules directory. 1.090 at requireWithFriendlyError (/app/node_modules/rollup/dist/native.js:64:9) 1.090 at Object. (/app/node_modules/rollup/dist/native.js:73:76) 1.090 at Module._compile (node:internal/modules/cjs/loader:1734:14) 1.090 at Object..js (node:internal/modules/cjs/loader:1899:10) 1.090 at Module.load (node:internal/modules/cjs/loader:1469:32) 1.090 at Function._load (node:internal/modules/cjs/loader:1286:12) 1.090 at TracingChannel.traceSync (node:diagnostics_channel:322:14) 1.090 at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) 1.090 at cjsLoader (node:internal/modules/esm/translators:311:5) 1.090 at ModuleWrap. (node:internal/modules/esm/translators:204:7) { 1.090 [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu' 1.090 Require stack: 1.090 - /app/node_modules/rollup/dist/native.js 1.090 at Function._resolveFilename (node:internal/modules/cjs/loader:1405:15) 1.090 at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19) 1.090 at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22) 1.090 at Function._load (node:internal/modules/cjs/loader:1215:37) 1.090 at TracingChannel.traceSync (node:diagnostics_channel:322:14) 1.090 at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) 1.090 at Module.require (node:internal/modules/cjs/loader:1491:12) 1.090 at require (node:internal/modules/helpers:135:16) 1.090 at requireWithFriendlyError (/app/node_modules/rollup/dist/native.js:46:10) 1.090 at Object. (/app/node_modules/rollup/dist/native.js:73:76) { 1.090 code: 'MODULE_NOT_FOUND', 1.090 requireStack: [ '/app/node_modules/rollup/dist/native.js' ] 1.090 } 1.090 } 1.090 1.090 Node.js v23.8.0