question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module 'fork-ts-checker-webpack-plugin-v5'

See original GitHub issue

- Building for production... ERROR Error: Cannot find module 'fork-ts-checker-webpack-plugin-v5' Error: Cannot find module 'fork-ts-checker-webpack-plugin-v5' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at api.chainWebpack.config (/app/node_modules/@vue/cli-plugin-typescript/index.js:106:16) at webpackChainFns.forEach.fn (/app/node_modules/@vue/cli-service/lib/Service.js:236:40) at Array.forEach (<anonymous>) at Service.resolveChainableWebpackConfig (/app/node_modules/@vue/cli-service/lib/Service.js:236:26) at PluginAPI.resolveChainableWebpackConfig (/app/node_modules/@vue/cli-service/lib/PluginAPI.js:145:25) at module.exports (/app/node_modules/@vue/cli-service/lib/commands/build/resolveAppConfig.js:9:22) at build (/app/node_modules/@vue/cli-service/lib/commands/build/index.js:147:50) at api.registerCommand (/app/node_modules/@vue/cli-service/lib/commands/build/index.js:89:13) at Service.run (/app/node_modules/@vue/cli-service/lib/Service.js:230:12) at Object.<anonymous> (/app/node_modules/@vue/cli-service/bin/vue-cli-service.js:36:9) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! frontend@0.1.0 build: vue-cli-service build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the frontend@0.1.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-07-08T15_55_28_937Z-debug.log`

I’m getting the following error while building frontend.

RUN npm install fork-ts-checker-webpack-plugin-v5 installing does not solve the issue.

Is this issue related to npm or node versions?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

14reactions
hernanpesantezcommented, Jul 17, 2022

@HFVladimir this worked for me, thanks! @OrrMarom Keep in mind that you need to create an nginx.conf file inside front-end folder. Changes:

nginx.conf:

server {
  listen 80;
  
  location / {
    root /usr/share/nginx/html;
    index index.html index.htm;
    try_files $uri $uri/ /index.html =404;
  }
  
  include /etc/nginx/extra-conf.d/*.conf;
}

Dockerfile:

FROM node:16 as build-stage
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY ./ /app/
ARG FRONTEND_ENV=production
ENV VUE_APP_ENV=${FRONTEND_ENV}
RUN npm run build
FROM nginx:1.15
COPY --from=build-stage /app/dist/ /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY ./nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf
0reactions
scrambldchannelcommented, Jul 17, 2022

👍 @HFVladimir and @hernanpesantez. The nginx.conf part was the missing piece for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >
Uncaught Error: Cannot find module "." · Issue #4921 - GitHub
I'm having this issue, but with import() :( 8 0vidiu, webdevbyjoss, hiteshgoyal18, shreyaHomelane ...
Read more >
How to resolve can't find module error in Node.js - Reactgo
To fix Cannot find module errors, install the modules properly by running a npm install command in the appropriate directory as your project's ......
Read more >
Fix Global Installs Not Working | "Cannot find module" error FIX
Getting " Cannot find module " after installing something globally (with -g)? Well, this video shows you how to fix global package/module ...
Read more >
Solved: Cannot find module react : npm install - YouTube
Your browser can't play this video. Learn more. Switch camera ... Solved: Cannot find module react : npm install. 58K views 3 years...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found