windows 10 pro office 2019 pro office 365 pro windows 10 home windows 10 enterprise office 2019 home and business office 2016 pro windows 10 education visio 2019 microsoft project 2019 microsoft project 2016 visio professional 2016 windows server 2012 windows server 2016 windows server 2019 Betriebssysteme office software windows server instagram takipçi instagram beğeni instagram görüntüleme instagram otomatik beğeni facebook beğeni facebook sayfa beğenisi facebook takipçi twitter takipçi twitter beğeni twitter retweet youtube izlenme youtube abone instagram

Issue when I want dockerize my nextjs project

Asked By: Anonymous

I encountering an issue to dockerize my nextjs (it’s a library to SSR ReactJS) project. When I tried to docker-compose up my application, it fails on step 6/8. Apparently, my flowtype plugin plugin-transform-flow-strip-types isn’t manage by the build process. That plugin was added to my package.json and on my .babelrc file. However, everything was fine when I use node start to launch my project or node build to build my project with nextjs. The problem is linked to docker.

Here my Dockerfile 👇

FROM node:10.13.0
RUN mkdir -p /website
COPY . /website
WORKDIR /website
RUN yarn install --production=true
RUN yarn run build
EXPOSE 3000 9229
CMD [ "yarn", "run", "start" ]

Here my docker-compose.yml 👇

version: "3"
        container_name: website
        build: .
            - "3000:3000"
            - "9229:9229"

Here my .babelrc file 👇

    "presets": [
    "plugins": [

Here the cli output when I run docker-compose 👇

   Error: (client) ./pages/index.jsx
   Module build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):
   Error: Cannot find module '@babel/plugin-transform-flow-strip-types' from '/website'

Here my package.json 👇

  "name": "XXXXXXXX",
  "description": "XXXXXXXX",
  "version": "0.0.1",
  "repository": {
    "type": "git",
    "url": "XXXXXXXXXXXXXXXX.git"
  "scripts": {
    "dev": "next -p 3000",
    "build": "next build",
    "start": "next start  -p 3000",
    "lint": "eslint . --ext .js --ext .jsx",
    "lint-fix": "eslint . --ext .js --ext .jsx --fix",
    "test": "jest --notify",
    "flow": "flow"
  "dependencies": {
    "next": "^7.0.2",
    "react": "^16.6.1",
    "react-dom": "^16.6.1",
    "react-apollo": "^2.2.4",
    "apollo-boost": "^0.1.20",
    "graphql": "^14.0.2"
  "devDependencies": {
    "babel-plugin-transform-flow-strip-types": "^6.22.0",
    "eslint": "^5.8.0",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-plugin-flowtype": "^3.2.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.1",
    "eslint-plugin-react": "^7.11.0",
    "flow-bin": "^0.85.0",
    "jest": "^23.6.0"

Do you have any idea to fix the problem?



Answered By: Anonymous

It looks like you’re depending on the wrong package, you’re depending on the babel 6.x version of plugin-transform-flow-strip-types, whereas in code, you’re requiring the babel 7.x version.

Run the following command to depend on babel 7.x version:

npm install --save-dev @babel/plugin-transform-flow-strip-types

Lastly, remove the old version from your dependencies with:

npm uninstall babel-plugin-transform-flow-strip-types

techinplanet staff

instagram volgers kopen volgers kopen buy windows 10 pro buy windows 11 pro

Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno
Alanya escort Manavgat escort Fethiye escort Kemer escort Didim escort Çanakkale escort Aydın escort Muğla escort Tekirdağ escort Manisa escort Balıkesir escort Trabzon escort Elazığ escort Ordu escort Kütahya escort Isparta escort Rize escort Kahramanmaraş escort Yalova escort Giresun escort Yozgat escort Tokat escort Şanlıurfa escort Sivas escort Batman escort Erzurum escort Sinop escort Kırşehir escort Karaman escort Kırıkkale escort Bolu escort Amasya escort Niğde escort Uşak escort Edirne escort Çorum escort Osmaniye escort Zonguldak escort Van escort Erzincan escort Söke escort Bodrum escort Çerkezköy escort Akhisar escort Bandırma escort Ayvacık escort Akçaabat escort Karakoçan escort Altınordu escort Tavşanlı escort Eğirdir escort Ardeşen escort Afşin escort Altınova escort Bulancak escort Sorgun escort Erbaa escort Viranşehir escort Zara escort Kozluk escort Aziziye escort Ayancık escort Kaman escort Ermenek escort Keskin escort Gerede escort Göynücek escort Bor escort Banaz escort Havsa escort Osmancık escort Bahçe escort Alaplı escort Başkale escort Kemah escort Nazilli escort Fethiye escort Çorlu escort Alaşehir escort Altıeylül escort Biga escort Araklı escort Kovancılar escort Fatsa escort Simav escort Yalvaç escort Çayeli escort Dulkadiroğlu escort Çiftlikköy escort Espiye escort Sarıkaya escort Niksar escort Suruç escort Yıldızeli escort Sason escort Horasan escort Boyabat escort Mucur escort Sarıveliler escort Yahşihan escort Göynük escort Gümüşhacıköy escort Çamardı escort Eşme escort İpsala escort Sungurlu escort Hasanbeyli escort Çaycuma escort İpekyolu escort Refahiye escort Kuşadası escort Marmaris escort Süleymanpaşa escort Turgutlu escort Susurluk escort Gelibolu escort Of escort Ünye escort Domaniç escort Fındıklı escort Elbistan escort Çınarcık escort Tirebolu escort Akdağmadeni escort Turhal escort Eyyübiye escort Suşehri escort Yakutiye escort Gerze escort Mengen escort Merzifon escort Ulukışla escort Sivaslı escort Keşan escort Kadirli escort Ereğli escort Özalp escort Tercan escort Efeler escort Didim escort Çine escort Dalaman escort Menteşe escort Milas escort Ortaca escort Seydikemer escort Ergene escort Kapaklı escort Malkara escort Salihli escort Şehzadeler escort Soma escort Yunusemre escort Ayvalık escort Bigadiç escort Burhaniye escort Gönen escort Karesi escort Çan escort Yenice escort Ortahisar escort Yomra escort Perşembe escort Pazar escort Onikişubat escort Pazarcık escort Türkoğlu escort Eynesil escort Görele escort Piraziz escort Yağlıdere escort Çayıralan escort Boğazlıyan escort Zile escort Siverek escort Karaköprü escort Haliliye escort Akçakale escort Şarkışla escort Gemerek escort Oltu escort Palandöken escort Mudurnu escort Suluova escort Taşova escort Toprakkale escort Kilimli escort Tuşba escort Üzümlü escort