Coder Social home page Coder Social logo

Comments (21)

geoph9 avatar geoph9 commented on June 2, 2024 5

So, I managed to solve my above issue by specifying the network. As far as I can tell, this is an issue with docker's embedded DNS but I am not sure about the details.

In my case, all I had to do is change the docker-compose.yml and specifically the images api, storefront, dashboard so that when building, they use host as the --network parameter. For example, my storefront section looks like the following:

  storefront:
    build:
      context: ./saleor-storefront
      dockerfile: ./Dockerfile.dev
      network: host
    ports:
      - 3000:3000
    restart: unless-stopped
    volumes:
      - ./saleor-storefront/:/app:cached
      - /app/node_modules/
    command: npm start -- --host 0.0.0.0

Anyway, I hope this will be useful to someone else in the same situation.

from saleor-platform.

geoph9 avatar geoph9 commented on June 2, 2024 1

I use docker 19.03.11 and docker-compose 1.27.4.

It turns out that this is a firewall issue and it is known to the fedora community (I am a new user and I didn't know that). I didn't want to risk it, so I deleted docker and installed moby (as per this) and I have no issues now.

from saleor-platform.

NyanKiyoshi avatar NyanKiyoshi commented on June 2, 2024

@talalsiddiqui can you provide use the full output? Thanks!

from saleor-platform.

talalsiddiqui avatar talalsiddiqui commented on June 2, 2024

image
I am not able to find log file in system ... but i have resolved the issue, by deleting the package-lock.json file

from saleor-platform.

NyanKiyoshi avatar NyanKiyoshi commented on June 2, 2024

Can you provide us every step you have used to run saleor-platform?

from saleor-platform.

talalsiddiqui avatar talalsiddiqui commented on June 2, 2024

Apologies for the late reply.
i have followed the exact steps which are written in Readme file

from saleor-platform.

talalsiddiqui avatar talalsiddiqui commented on June 2, 2024

One thing more, if I install the storefront repo separately, then I face no issues.
but when I use this Plateform repo and do the installation then I faced the above issues.
I resolved the above issues by deleting the package-lock.json file, but still, it took me many hours to figure out.
plus as you can see on screenshot, on WORKDIR command no app folder created.

from saleor-platform.

NyanKiyoshi avatar NyanKiyoshi commented on June 2, 2024

Weird. I will pass it to the storefront team to look into. Outdated packages in package-lock often can cause issues.

from saleor-platform.

MahmoudGad-key avatar MahmoudGad-key commented on June 2, 2024

I have the exact error in Ubuntu 16.04.6 (LTS) x64

from saleor-platform.

sah-anshu avatar sah-anshu commented on June 2, 2024

Successfully tagged saleor-platform_storefront:latest
Building dashboard
Step 1/13 : FROM node:10
---> e7671d9424c2
Step 2/13 : WORKDIR /app
---> Using cache
---> be35a61fb89e
Step 3/13 : COPY package*.json ./
---> Using cache
---> 035fdec0e77b
Step 4/13 : RUN npm install
---> Running in 6c2502fc94ba
npm WARN [email protected] No description

npm ERR! network timeout at: https://registry.npmjs.org/@apollographql/graphql-language-service-utils/-/graphql-language-service-utils-2.0.2.tgz

Error in Debian10

from saleor-platform.

MahmoudGad-key avatar MahmoudGad-key commented on June 2, 2024

I tried to install in centos 9 and it worked

from saleor-platform.

NyanKiyoshi avatar NyanKiyoshi commented on June 2, 2024

image
I am not able to find log file in system ... but i have resolved the issue, by deleting the package-lock.json file

Try deleting node_modules (rm -rf node_modules), then redo.

Successfully tagged saleor-platform_storefront:latest
Building dashboard
Step 1/13 : FROM node:10
---> e7671d9424c2
Step 2/13 : WORKDIR /app
---> Using cache
---> be35a61fb89e
Step 3/13 : COPY package*.json ./
---> Using cache
---> 035fdec0e77b
Step 4/13 : RUN npm install
---> Running in 6c2502fc94ba
npm WARN [email protected] No description

npm ERR! network timeout at: https://registry.npmjs.org/@apollographql/graphql-language-service-utils/-/graphql-language-service-utils-2.0.2.tgz

Error in Debian10

Retry, check your connectivity and npm status.

from saleor-platform.

geoph9 avatar geoph9 commented on June 2, 2024

I have a similar issue on fedora 32:

Screenshot from 2020-10-15 15-23-03

It still appears when building storefront and doing npm install. I have also created a /etc/docker/daemon.json file as instructed here but nothing changed. Any ideas?

from saleor-platform.

NyanKiyoshi avatar NyanKiyoshi commented on June 2, 2024

Weird. What docker version is it? @geoph9

from saleor-platform.

Kamoliddin1 avatar Kamoliddin1 commented on June 2, 2024

@NyanKiyoshi I have this kind of issue!
When it comes to npm install it gives this kind of WARNs
I use docker 19.03.13 docker-compose 1.27.4. node - v12.19.0 npm - 6.14.8
My os - Ubuntu 18.04
Screenshot from 2020-10-20 01-32-12

from saleor-platform.

pipoupiwam avatar pipoupiwam commented on June 2, 2024

@NyanKiyoshi I have this kind of issue!

I also encountered this issue and solved it using this : saleor/saleor#6414 (comment)

from saleor-platform.

NyanKiyoshi avatar NyanKiyoshi commented on June 2, 2024

@pipoupiwam can you provide the npm error logs? Run: docker-compose build storefront and provide us the output.

This is most likely an issue with package-lock.json. But I'm not sure whether that would be the same as above, where they had corrupted packages.

Can you also provide some additional information, if that's Linux/Unix-based:

uname -mrsv
docker -v
docker-compose -v

If that's Windows, remove that uname one.

Also, for additional context so we can reproduce, provide the Saleor-Storefront version:

  1. Change your current directory to Saleor Storefront
  2. git describe --all --long --abbrev=40

from saleor-platform.

TGalioAutomation avatar TGalioAutomation commented on June 2, 2024

same issue when work in macbook m1

from saleor-platform.

TGalioAutomation avatar TGalioAutomation commented on June 2, 2024

Uploading Screen Shot 2021-06-14 at 22.21.05.png…

from saleor-platform.

metouitude avatar metouitude commented on June 2, 2024

So, I managed to solve my above issue by specifying the network. As far as I can tell, this is an issue with docker's embedded DNS but I am not sure about the details.

In my case, all I had to do is change the docker-compose.yml and specifically the images api, storefront, dashboard so that when building, they use host as the --network parameter. For example, my storefront section looks like the following:

  storefront:
    build:
      context: ./saleor-storefront
      dockerfile: ./Dockerfile.dev
      network: host
    ports:
      - 3000:3000
    restart: unless-stopped
    volumes:
      - ./saleor-storefront/:/app:cached
      - /app/node_modules/
    command: npm start -- --host 0.0.0.0

Anyway, I hope this will be useful to someone else in the same situation.

Specifying network as host worked for me

from saleor-platform.

krzysztofwolski avatar krzysztofwolski commented on June 2, 2024

network: host does not work properly on Mac, so we solved the issue by adding proxy in the storefront container

from saleor-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.