full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
docker-compose build error
Error: Cannot find module 'fork-ts-checker-webpack-plugin-v5'
=> ERROR [build-stage 7/7] RUN npm run build 3.5s
[build-stage 7/7] RUN npm run build:
#13 1.216
#13 1.216 > [email protected] build /app #13 1.216 > vue-cli-service build #13 1.216 #13 2.477 #13 2.479 - Building for production... #13 3.447 ERROR Error: Cannot find module 'fork-ts-checker-webpack-plugin-v5' #13 3.448 Error: Cannot find module 'fork-ts-checker-webpack-plugin-v5' #13 3.448 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) #13 3.448 at Function.Module._load (internal/modules/cjs/loader.js:508:25) #13 3.448 at Module.require (internal/modules/cjs/loader.js:637:17) #13 3.448 at require (internal/modules/cjs/helpers.js:22:18) #13 3.448 at api.chainWebpack.config (/app/node_modules/@vue/cli-plugin-typescript/index.js:106:16) #13 3.448 at webpackChainFns.forEach.fn (/app/node_modules/@vue/cli-service/lib/Service.js:236:40) #13 3.448 at Array.forEach () #13 3.448 at Service.resolveChainableWebpackConfig (/app/node_modules/@vue/cli-service/lib/Service.js:236:26) #13 3.448 at PluginAPI.resolveChainableWebpackConfig (/app/node_modules/@vue/cli-service/lib/PluginAPI.js:145:25) #13 3.448 at module.exports (/app/node_modules/@vue/cli-service/lib/commands/build/resolveAppConfig.js:9:22) #13 3.448 at build (/app/node_modules/@vue/cli-service/lib/commands/build/index.js:147:50) #13 3.448 at api.registerCommand (/app/node_modules/@vue/cli-service/lib/commands/build/index.js:89:13) #13 3.448 at Service.run (/app/node_modules/@vue/cli-service/lib/Service.js:230:12) #13 3.448 at Object. (/app/node_modules/@vue/cli-service/bin/vue-cli-service.js:36:9) #13 3.448 at Module._compile (internal/modules/cjs/loader.js:701:30) #13 3.448 at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) #13 3.474 npm ERR! code ELIFECYCLE #13 3.475 npm ERR! errno 1 #13 3.476 npm ERR! [email protected] build: vue-cli-service build#13 3.476 npm ERR! Exit status 1 #13 3.476 npm ERR! #13 3.476 npm ERR! Failed at the [email protected] build script. #13 3.477 npm ERR! This is probably not a problem with npm. There is likely additional logging output above. #13 3.482 #13 3.482 npm ERR! A complete log of this run can be found in: #13 3.482 npm ERR! /root/.npm/_logs/2022-09-19T11_11_50_121Z-debug.log
executor failed running [/bin/sh -c npm run build]: exit code: 1 ERROR: Service 'frontend' failed to build : Build failed
I get this error too..
@Luckyweqer @bkrram The problem is related to the fact that this "official" project has not been updated in over two years, and a ton of the dependencies are broken. Use one of the forks available in order to get a working project. This one specifically seems to work well and has a decent reputation https://github.com/pyb4430/full-stack-fastapi-postgresql
I avoided this bug by modified the file in
# .\frontend\Dockerfile
- COPY ./ /app
+ COPY ./dist /app/dist
and run npm run build
I found this bug only occur in the docker build comand ,but this is not a right way to solve this bug.
I just encountered this issue or something remarkably similar.
Is there a fix for this?
=> ERROR [build-stage 7/7] RUN npm run build 1.5s
------
> [build-stage 7/7] RUN npm run build:
#0 0.810
#0 0.810 > [email protected] build /app
#0 0.810 > vue-cli-service build
#0 0.810
#0 1.131
#0 1.132 - Building for production...
#0 1.406 ERROR Error: Cannot find module 'fork-ts-checker-webpack-plugin-v5'
#0 1.406 Error: Cannot find module 'fork-ts-checker-webpack-plugin-v5'
#0 1.406 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
#0 1.406 at Function.Module._load (internal/modules/cjs/loader.js:508:25)
#0 1.406 at Module.require (internal/modules/cjs/loader.js:637:17)
#0 1.406 at require (internal/modules/cjs/helpers.js:22:18)
#0 1.406 at api.chainWebpack.config (/app/node_modules/@vue/cli-plugin-typescript/index.js:106:16)
#0 1.406 at webpackChainFns.forEach.fn (/app/node_modules/@vue/cli-service/lib/Service.js:236:40)
#0 1.406 at Array.forEach (<anonymous>)
#0 1.406 at Service.resolveChainableWebpackConfig (/app/node_modules/@vue/cli-service/lib/Service.js:236:26)
#0 1.406 at PluginAPI.resolveChainableWebpackConfig (/app/node_modules/@vue/cli-service/lib/PluginAPI.js:145:25)
#0 1.406 at module.exports (/app/node_modules/@vue/cli-service/lib/commands/build/resolveAppConfig.js:9:22)
#0 1.406 at build (/app/node_modules/@vue/cli-service/lib/commands/build/index.js:147:50)
#0 1.406 at api.registerCommand (/app/node_modules/@vue/cli-service/lib/commands/build/index.js:89:13)
#0 1.406 at Service.run (/app/node_modules/@vue/cli-service/lib/Service.js:230:12)
#0 1.406 at Object.<anonymous> (/app/node_modules/@vue/cli-service/bin/vue-cli-service.js:36:9)
#0 1.406 at Module._compile (internal/modules/cjs/loader.js:701:30)
#0 1.406 at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
#0 1.411 npm ERR! code ELIFECYCLE
#0 1.411 npm ERR! errno 1
#0 1.412 npm ERR! [email protected] build: `vue-cli-service build`
#0 1.412 npm ERR! Exit status 1
#0 1.412 npm ERR!
#0 1.412 npm ERR! Failed at the [email protected] build script.
#0 1.412 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#0 1.430
#0 1.430 npm ERR! A complete log of this run can be found in:
#0 1.430 npm ERR! /root/.npm/_logs/2023-03-15T06_13_27_126Z-debug.log
Did you find any solution to this ?
+1, also see this problem.