Giter Site home page Giter Site logo

Comments (6)

rash805115 avatar rash805115 commented on June 15, 2024 1

Hello @jibin2706 I found the issue :) It had nothing to do with this project, but I had a lot of fun figuring it out so I will share my results.

Background

I am working on this project - Plugins by Quadnix, where you can simply upload and share your web application. I thought your web application is very cool and I wanted to have this on my "Plugins" website. click here to see how it looks.

Problem

The flow of "Plugins" is quite simple. Build (e.g. npm install), Zip (to save the output for future run), and Run (e.g. npm start). In your web application instance, npm start is referring to webpack-dev-server program, which was throwing errors as shown in my issue.

Root Cause

I didn't know it then, but npm install creates a node_modules/.bin directory which contains symlinks to all the executables including webpack-dev-server. And the zip program (yazl) that I was using does not support copying of symlinks. So in step 2 of Plugins, the zip archive didn't have the symlinks that npm start was expecting to be.

Deleting and re-running npm install would work because then npm would create fresh symlinks. This is why it was running in local, and not in my test environment (where I was using zip library).

Fix

Instead of using webpack-dev-server, I started using the full path node_modules/webpack-dev-server/bin/webpack-dev-server.js.

from cidr.xyz.

jibin2706 avatar jibin2706 commented on June 15, 2024

@rash805115 can you delete the node_modules folder and try again

from cidr.xyz.

rash805115 avatar rash805115 commented on June 15, 2024

Hello @jibin2706 . I tried it a couple of times, but I am constantly hitting this issue. Could this be an issue info [email protected]: The platform "linux" is incompatible with this module.?

from cidr.xyz.

jibin2706 avatar jibin2706 commented on June 15, 2024

I tried in ubuntu, got the info [email protected]: The platform "linux" is incompatible with this module but everything is working fine.

yarn install v1.12.3 [1/4] Resolving packages... [2/4] Fetching packages... info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... Done in 846.24s.

from cidr.xyz.

rash805115 avatar rash805115 commented on June 15, 2024

If you like I can try to create a Dockerfile with alpine image and try to reproduce this.

from cidr.xyz.

rash805115 avatar rash805115 commented on June 15, 2024

Actually, now that I make a Dockerfile, I cannot reproduce this issue. It only happens in my other environment. But I guess then something is wrong in my setup, not yours. I will keep on investigating, and will keep the issue open for a couple of days if you don't mind.

FROM node:8.10.0-alpine

# Installing:
# ===========
# node: 8.10.0
# npm: 5.6.0
# yarn: 1.5.1

RUN mkdir -p /server
WORKDIR /server

COPY ./ /server/
RUN npm install

EXPOSE 8080
ENTRYPOINT ["npm", "start"]

from cidr.xyz.

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.