Install Problems


#1

Hi All,
I am currently trying to install Atom on a win7 laptop & keep getting an Installation has failed error. I have run install file as admin & also temporarily stopped antivirus & still get issue. Reviewing the logfile it looks like there are issues with paths/ file names being too long??? Does anyone know a solution for this?

Many thanks, John


#2

Sometimes windows has issues with paths being too deep aka long path name. What directory are you trying to install Atom to? Possibly try installing it to a directory closer to the root of your drive.


#3

Thks for the quick reply. I’m a little confused though - how can I select install location - there is no option for this when I try & install :frowning: Sorry if its a silly question… Thks again for your help - John


#4

I have not had to run the windows installer, I thought the Atom installer might have a feature to select the install directory. Do you know what file it is failing on? According to Technet the Path limit is 248 characters. Path+Filename limit is 260 characters. Maybe a file got checked in that has an abnormally long name.


#5

Well it looks like there might be a few problems… Below is part of the error log showing some of the issues … (please note that I have deleted a part of the full directory path & replaced with …

Thks, John

2015-10-12 09:56:33> Program: Starting Squirrel Updater: --install .
2015-10-12 09:56:33> Program: Starting install, writing to C:…\AppData\Local\SquirrelTemp
2015-10-12 09:56:33> Program: About to install to: C:…\AppData\Local\atom
2015-10-12 09:56:33> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:…\AppData\Local\atom\packages\RELEASES’.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
at Squirrel.UpdateManager.CheckForUpdateImpl.d__3c.MoveNext()
2015-10-12 09:56:33> CheckForUpdateImpl: Reading RELEASES file from C:…\AppData\Local\SquirrelTemp
2015-10-12 09:56:33> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2015-10-12 09:56:33> ApplyReleasesImpl: Writing files to app directory: C:…\AppData\Local\atom\app-1.0.19
2015-10-12 09:56:39> IEnableLogger: Failed to install package to app dir: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)


#6

Are you running on 32 or 64bit windows 7? I just installed atom on a windows 7 x64 VM I have and it installed without issue.


#7

Win7 Pro 64bit service Pack1…


#8

I would lean towards permissions issue or something similar then. Sorry I can’t be more help other than that.


#9

I unpacked atom-windows.zip from this page to a location on my computer and ran the following node script from that directory. It should print the maximum number of characters of any filepath relative to that directory.

#!/usr/bin/env node

'use strict';

var fs = require('fs');
var path = require('path');

var max = 0;

function maxLength(dir) {
  dir = dir || __dirname;
  for(let p of fs.readdirSync(dir)) {
    p = path.resolve(dir, p);
    let stat = fs.lstatSync(p);
    if(stat.isDirectory()) {
      maxLength(p);
    } else if(p.length > max) {
      max = p.length;
    }
  }
  return max;
}

console.log(maxLength() - __dirname.length);

I ran it on linux, and I don’t really know how windows handles paths or if the installer installs some extra files with longer paths, so the outcome may vary a bit, but the result on my computer is 191. That means there’s only 260 - 191 = 69 characters left for the path Atom installs itself to which I believe is C:\Users\[username]\AppData\Local\atom\app-[version] and so 69 - 28 = 41 characters are left for your username and the version number. The version number is at least 5 characters (X.Y.Z), so that leaves at most 36 characters for your username, which should be enough in most cases, but it’s not a whole lot…


#10

@raelyard do you know what the current status of the “path too long” issue is on Windows? I thought that there was an update to some version of npm that was supposed to fix it in most cases?


#11

I don’t really know about npm. There are ways to work around the limitation if certain Windows API aren’t used, so certainly could be the case that there’s a npm that resolves it.


#12

The original problem with npm is that dependencies of X are stored in X\node_modules and dependencies of Y (which is a dependency of X) are stored in X\node_modules\Y\node_modules and so on and so on … New versions of npm were supposed to store dependencies in a different way.