Coder Social home page Coder Social logo

Comments (8)

rbkreisberg avatar rbkreisberg commented on April 28, 2024

It looks like the same thing can happen with npm 2. When the devDependency version of async is close enough to the child dep of a production dependency, that linked dep is lost.

from electron-react-boilerplate.

jhen0409 avatar jhen0409 commented on April 28, 2024

In my work project, I using a new folder to build (including package.json), and run npm i --production reinstall dependencies, it seems to solved this problem, @chentsulin you think? Or do we use webpack in main script? :D

from electron-react-boilerplate.

chentsulin avatar chentsulin commented on April 28, 2024

Maybe we can give electron-packager's opts prune a try and see whether it works on npm@3 or not.

from electron-react-boilerplate.

rbkreisberg avatar rbkreisberg commented on April 28, 2024

@jhen0409 How do you run the build without the devDependencies present in the project? Does this mean that electron-packager and the other build tools are being pulled into the compiled app?

from electron-react-boilerplate.

rbkreisberg avatar rbkreisberg commented on April 28, 2024

I tried the following:

added npm as a devDependency
npm install npm --save-dev

Identify production only (or dev only) dependencies using the following

npm.load({json:true, parseable: true, production: true}, function(err) {
      npm.ls([], function(err, data, lite) {
         console.log(data);
          console.log(lite);
       });
});

but either this is broken or the parameters are wrong.

from electron-react-boilerplate.

jhen0409 avatar jhen0409 commented on April 28, 2024

@rbkreisberg no, I just create new a child folder (copy package.json to it, use --production to install or copy node_modules then prune), so build is work on parent folder, but it only packaging for node_modules of the child folder.

from electron-react-boilerplate.

jhen0409 avatar jhen0409 commented on April 28, 2024

@chentsulin electron-packager's prune it works! @rbkreisberg you can try in this.

from electron-react-boilerplate.

rbkreisberg avatar rbkreisberg commented on April 28, 2024

@jhen0409 @chentsulin thanks. I used prune for a while and took it out after rebasing to a more recent version of electron-react-boilerplate. Adding it back in solved my issue!

from electron-react-boilerplate.

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.