Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds empty nw:blank app on Windows/Linux #107

Closed
nolanlawson opened this issue Nov 10, 2014 · 20 comments
Closed

Builds empty nw:blank app on Windows/Linux #107

nolanlawson opened this issue Nov 10, 2014 · 20 comments

Comments

@nolanlawson
Copy link

This was already filed on grunt-node-webkit-builder, but I think it might be more appropriate in this repo: nwjs/grunt-nw-builder#117.

Anybody seen this issue? Basically Windows and Linux are unbuildable. :(

@adam-lynch
Copy link
Contributor

I've gotten this myself yesterday after I updated to 0.11.0 (I'll try again with 0.10.5 after I post this). Building for Windows on Mac, and then running on Windows, worked.

@steffenmllr @gabepaez any idea what could be the cause?

@steffenmllr
Copy link
Contributor

If someone could provide a test app which is not building, this would be great.

@adam-lynch
Copy link
Contributor

Of course... my example project, which should fail to build, actually builds fine 😄

@adam-lynch
Copy link
Contributor

My own project is now building fine on Windows. I was actually using node-webkit-builder#platform-overrides not the latest from npm.

Also, see #110, it might be related to this issue. Not sure. I ran into it when creating an example app for this issue.

@adam-lynch
Copy link
Contributor

Could you try again with the latest version?

@rlee1121
Copy link

@adam-lynch Can you provide a little more detail as to how you got your Windows build working (versions, options for NwBuilder instance, etc.)? Experiencing the same issue ("nw:blank" loading) with the following:

node-webkit: 0.11.5,
node-webkit-builder: 1.0.4

var nw = new NwBuilder({
    appName: pkg.displayName,
    appVersion: pkg.version,
    files: [ "package.json",  "./src/**/*", "./libs/**/*", "./public/**/*"],
    platforms: ["win"],
    version: "0.11.5",
    winIco: pkg.winIcon
});

@Thomas-B
Copy link

@rlee1121
I experienced the same issue and resolved it by removing a module which was really deep.
As @adam-lynch said here it might be related to path's length.

@adam-lynch
Copy link
Contributor

@rlee1121 try Path Length Checker which I mentioned in the issue @Thomas-B linked to. (Thanks @Thomas-B)

@rlee1121
Copy link

@Thomas-B @adam-lynch thanks so much for the suggestions, this was indeed the issue!

@marbemac
Copy link

I'm also running into this issue - nw:blank on Windows. I'm using Sails.js, and I think I'm running into the path name length issue described above. However.. I can't just leave sails out of the node_modules folder - it's required for my app to function. Does anybody have any suggestions, other than removing whichever modules include long path names? Thanks!

@adam-lynch
Copy link
Contributor

@marbemac Let's say there is one module which is a dependency of Sails.js which is a cause of long paths. An example path: node_modules/Sails.js/node_modules/a/node_modules/b/.../node_modules/z.js.

Manually npm install --save g (g or a module a good bit down the node_modules tree which is still under 256 characters), then delete the node_modules/Sails.js directory and re-install it. That way, it shouldn't install g and all of g's own dependencies inside node_modules/Sails.js/node_modules/a/.../f/node_modules anymore.

@marbemac
Copy link

@adam-lynch It's a pain, but that works, thanks! 👍 The endless nesting in npm is tiresome.

@adam-lynch
Copy link
Contributor

@nolanlawson still a problem with the latest version?

@Nitemaeric
Copy link

@adam-lynch Is there any way to simplify this process? Is the 256 character length path a windows hard limitation?

@adam-lynch
Copy link
Contributor

@Nitemaeric Not really, no. There are node modules out there for flattening your dependencies but as far as I know they're not reliable, because if two modules depend on two different versions of the same module, then they'll probably just take one version and discard the other.

Yeah, more info here: http://stackoverflow.com/questions/1880321/why-does-the-260-character-path-length-limit-exist-in-windows.

@Nitemaeric
Copy link

@adam-lynch Ok, thanks! I should get to flattening my dependencies then!

@marcfowler
Copy link

I ran into this exact issue and it was a nightmare! I tried to do things manually but I had a whole bunch of problems with that, as my dependencies were pretty complex.

In the end, I figured it out by using https://www.npmjs.com/package/flatten-packages

As you said @adam-lynch, it does discard multiple versions of the same but as it happens, that was okay for me. It took some manual jiggering around but this does at least seem to be the cause and I thought I'd share what worked for me!

@adam-lynch
Copy link
Contributor

Everyone, see Dealing with long paths

@seiyria
Copy link

seiyria commented Oct 10, 2015

npm@3 might also help this situation. It installs flat instead of nested by default, then nests when there is a version conflict.

@adam-lynch
Copy link
Contributor

Closing this as I'm hoping the replies helped above or it's now solved as of npm@3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants