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.

Getting started: Docker compose up fails

See original GitHub issue

Describe the bug:

Hey there. I was going through contributing guideline and was trying to setup locally.

I tried docker compose up just to see the project current state first. But it fails due to an import unresolved error.

Output of my terminal

 > [5/5] RUN npm run build:                                                                                                             
#7 0.927                                                                                                                                
#7 0.927 > chapter-client@1.0.0 build                                                                                                   
#7 0.927 > next build                                                                                                                   
#7 0.927                                                                                                                                
#7 2.207 Attention: Next.js now collects completely anonymous telemetry regarding usage.
#7 2.208 This information is used to shape Next.js' roadmap and prioritize features.
#7 2.208 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
#7 2.208 https://nextjs.org/telemetry
#7 2.208 
#7 2.242 Browserslist: caniuse-lite is outdated. Please run:
#7 2.242 npx browserslist@latest --update-db
#7 2.242 
#7 2.242 Why you should do it regularly:
#7 2.242 https://github.com/browserslist/browserslist#browsers-data-updating
#7 2.281 info  - Checking validity of types...
#7 25.71 info  - Creating an optimized production build...
#7 25.86 warn  - Disabled SWC as replacement for Babel because of custom Babel configuration "babel.config.js" https://nextjs.org/docs/messages/swc-disabled
#7 26.73 Browserslist: caniuse-lite is outdated. Please run:
#7 26.73 npx browserslist@latest --update-db
#7 26.73 
#7 26.73 Why you should do it regularly:
#7 26.73 https://github.com/browserslist/browserslist#browsers-data-updating
#7 27.65 info  - Using external babel configuration from /usr/chapter/client/babel.config.js
#7 71.89 Failed to compile.
#7 71.89 
#7 71.89 ./node_modules/@chakra-ui/checkbox/dist/cjs/checkbox-icon.js
#7 71.89 Module not found: Can't resolve 'framer-motion' in '/usr/chapter/client/node_modules/@chakra-ui/checkbox/dist/cjs'
#7 71.89 
#7 71.89 Import trace for requested module:
#7 71.89 ./node_modules/@chakra-ui/checkbox/dist/cjs/checkbox.js
#7 71.89 ./node_modules/@chakra-ui/checkbox/dist/cjs/index.js
#7 71.89 ./node_modules/@chakra-ui/react/dist/cjs/index.js
#7 71.89 ./node_modules/chakra-data-table/dist/chakra-data-table.cjs.production.min.js
#7 71.89 ./node_modules/chakra-data-table/dist/index.js
#7 71.89 ./src/modules/dashboard/Chapters/pages/ChaptersPage.tsx
#7 71.89 ./src/modules/dashboard/Chapters/index.ts
#7 71.89 ./src/pages/dashboard/chapters/index.tsx
#7 71.89 
#7 71.89 ./node_modules/@chakra-ui/checkbox/dist/esm/checkbox-icon.js
#7 71.89 Module not found: Can't resolve 'framer-motion' in '/usr/chapter/client/node_modules/@chakra-ui/checkbox/dist/esm'
#7 71.89 
#7 71.89 Import trace for requested module:
#7 71.89 ./node_modules/@chakra-ui/checkbox/dist/esm/checkbox.js
#7 71.89 ./node_modules/@chakra-ui/checkbox/dist/esm/index.js
#7 71.89 ./node_modules/@chakra-ui/react/dist/esm/index.js
#7 71.89 ./src/pages/_app.tsx
#7 71.89 
#7 71.89 ./node_modules/@chakra-ui/menu/dist/cjs/menu.js
#7 71.89 Module not found: Can't resolve 'framer-motion' in '/usr/chapter/client/node_modules/@chakra-ui/menu/dist/cjs'
#7 71.89 
#7 71.89 Import trace for requested module:
#7 71.89 ./node_modules/@chakra-ui/menu/dist/cjs/index.js
#7 71.89 ./node_modules/@chakra-ui/react/dist/cjs/index.js
#7 71.89 ./node_modules/chakra-data-table/dist/chakra-data-table.cjs.production.min.js
#7 71.89 ./node_modules/chakra-data-table/dist/index.js
#7 71.89 ./src/modules/dashboard/Chapters/pages/ChaptersPage.tsx
#7 71.89 ./src/modules/dashboard/Chapters/index.ts
#7 71.89 ./src/pages/dashboard/chapters/index.tsx
#7 71.89 
#7 71.89 ./node_modules/@chakra-ui/menu/dist/esm/menu.js
#7 71.89 Module not found: Can't resolve 'framer-motion' in '/usr/chapter/client/node_modules/@chakra-ui/menu/dist/esm'
#7 71.89 
#7 71.89 Import trace for requested module:
#7 71.89 ./node_modules/@chakra-ui/menu/dist/esm/index.js
#7 71.89 ./node_modules/@chakra-ui/react/dist/esm/index.js
#7 71.89 ./src/pages/_app.tsx
#7 71.89 
#7 71.89 ./node_modules/@chakra-ui/modal/dist/cjs/modal-transition.js
#7 71.89 Module not found: Can't resolve 'framer-motion' in '/usr/chapter/client/node_modules/@chakra-ui/modal/dist/cjs'
#7 71.89 
#7 71.89 Import trace for requested module:
#7 71.89 ./node_modules/@chakra-ui/modal/dist/cjs/modal.js
#7 71.89 ./node_modules/@chakra-ui/modal/dist/cjs/index.js
#7 71.89 ./node_modules/@chakra-ui/react/dist/cjs/index.js
#7 71.89 ./node_modules/chakra-data-table/dist/chakra-data-table.cjs.production.min.js
#7 71.89 ./node_modules/chakra-data-table/dist/index.js
#7 71.89 ./src/modules/dashboard/Chapters/pages/ChaptersPage.tsx
#7 71.89 ./src/modules/dashboard/Chapters/index.ts
#7 71.89 ./src/pages/dashboard/chapters/index.tsx
#7 71.89 
#7 71.89 
#7 71.89 > Build failed because of webpack errors
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c npm run build]: exit code: 1

So i just tried to find out the error myself. I have used chakra before an i think it needs framer motion as dependency. Found out that it missing in client package.json and that why build fails due to module not found.

Tell us about your browser and operating system:

  • Browser(s) name and version: NA
  • Operating System: Mac os

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
akhilmhdhcommented, Nov 5, 2021

Screenshot 2021-11-05 at 11 18 54 PM

Yehhh… Cheers 🥂 Its working fine now.

Closing this issue as it resolved. @ojeytonwilliams I would love to work on any part of this, backend or frontend. You have anywhere that can point me

1reaction
allellacommented, Nov 5, 2021

@akhilmhdh I get the error if I try to npm i with an older npm 6 version.

I used nvm to switch to node 16 and npm 8 and it worked fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker-compose up fails when docker-compose run is ...
I am trying to dockerize my Django-postgres app and run 2 commands using docker-compose My Dockerfile is:
Read more >
docker compose up - Docker Documentation
The docker compose up command aggregates the output of each container (like ... If the process encounters an error, the exit code for...
Read more >
Docker compose up build fails to update container
Let's explain what this command is requested to do: up start the service your_service; --build build the image if it does not exist...
Read more >
Todo app fails on startup with docker-compose #48 - GitHub
In the getting started tutorial, we create the following docker-compose.yml to start the app with mysql: version: "3.7" services: app ...
Read more >
docker-compose up - ERROR: encountered errors while ...
Installation - getting started with docker - docker-compose up - ERROR: encountered errors while bringing up the project ... On running docker- ...
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