Settings-view: Can't install certain package

Created on 27 Nov 2017  ·  9Comments  ·  Source: atom/settings-view

Prerequisites

Description

I try install my package https://github.com/icetee/remote-ftp, but can not be installed in Settings view. I do not get any error code that I can debug.

Installing package Remote-FTP failed Error: Installing “[email protected]” failed.
    at C:\Users\icetee\AppData\Local\atom\app-1.23.0-beta1\resources\app\node_modules\settings-view\lib\package-manager.js:547:27
    at exit (C:\Users\icetee\AppData\Local\atom\app-1.23.0-beta1\resources\app\node_modules\settings-view\lib\package-manager.js:128:22)
    at triggerExitCallback (C:\Users\icetee\AppData\Local\atom\app-1.23.0-beta1\resources\app\src\buffered-process.js:338:17)
    at ChildProcess.<anonymous> (C:\Users\icetee\AppData\Local\atom\app-1.23.0-beta1\resources\app\src\buffered-process.js:368:17)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) fs.js:640
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Users\icetee\.atom\packages\Remote-FTP\package.json'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Proxy.fs.readFileSync (fs.js:508:33)
    at Proxy.fs.readFileSync (C:\Users\icetee\AppData\Local\atom\app-1.23.0-beta1\resources\app\apm\node_modules\asar-require\lib\require.js:86:27)
    at C:\Users\icetee\AppData\Local\atom\app-1.23.0-beta1\resources\app\apm\lib\install.js:476:42
    at fn (C:\Users\icetee\AppData\Local\atom\app-1.23.0-beta1\resources\app\apm\node_modules\async\lib\async.js:582:34)
    at Immediate.<anonymous> (C:\Users\icetee\AppData\Local\atom\app-1.23.0-beta1\resources\app\apm\node_modules\async\lib\async.js:498:34)
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
    at processImmediate [as _immediateCallback] (timers.js:594:5)

Steps to Reproduce

  1. Settings View > Install
  2. Type remote-ftp
  3. Click install button
  4. Wait and return error

Expected behavior: Error-free installation

Actual behavior: Returns the error and does not install the package.

Reproduces how often: 100%

Versions

Windows 10
Atom : 1.23.0-beta1
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0

Additional Information

There is no problem with version 1.22.1.
Installing the command line is perfectly installed. apm install remote-ftp
Related of https://github.com/icetee/remote-ftp/issues/1066

bug regression triaged

Most helpful comment

Identified cause in apm https://github.com/atom/apm/commit/c9f021038f847376bff53150f1e2b28362b9981b#diff-2c69f8ac15f464ce4b59338eb9300b3fR358 - investigating fix.

All 9 comments

Thanks for the report - I can confirm the same behavior from Settings > Install:

  • Installs in 1.22.1.
  • Doesn't install in 1.23.1-beta0, same error from issue body
  • Installing with apm install remote-ftp works

I also noticed:

  • Installing with apm-beta install remote-ftp works fine
  • Installing with apm-beta install Remote-FTP fails with the same error from the issue body
  • Installing with apm install Remote-FTP works

apm version info:

$ apm-beta -v
apm  1.18.10
npm  3.10.10
node 6.9.5 x64
atom 1.23.0-beta0
python 2.7.10
git 2.13.5

$ apm -v
apm  1.18.8
npm  3.10.10
node 6.9.5 x64
python 2.7.10
git 2.13.5

Same issue.

Installing Zen to /home/user/.atom/packages ✓
fs.js:640
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/home/user/.atom/packages/Zen/package.json'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Proxy.fs.readFileSync (fs.js:508:33)
    at Proxy.fs.readFileSync (/usr/share/atom/resources/app/apm/node_modules/asar-require/lib/require.js:86:27)
    at /usr/share/atom/resources/app/apm/lib/install.js:476:42
    at fn (/usr/share/atom/resources/app/apm/node_modules/async/lib/async.js:582:34)
    at Immediate.<anonymous> (/usr/share/atom/resources/app/apm/node_modules/async/lib/async.js:498:34)
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
    at processImmediate [as _immediateCallback] (timers.js:594:5)

apm install zen

Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:    17.10
Codename:   artful
$ apm -v
apm  1.18.11
npm  3.10.10
node 6.9.5 x64
atom 1.23.0
python 2.7.14
git 2.14.1

@maxbrunsfeld we talked about this one last week and someone mentioned you might have some insight into this? Possibly related to case sensitivity and package names? I might be mis-remembering though so let me know if this doesn't ring a bell and I can see if anyone else can take a look :v:

It is acceptable to me if in the future can not be used uppercase letters in the package name.

I found a rule in the NPM documentation:
"New packages must not have uppercase letters in the name."

  • But from now it should be blocked so that it can not be create new packages with uppercase.
  • When install it, need to convert package name to lowercase.

We are seeing similar issues on Hydrogen.

Can we just change the package name in package.json to lower case without breaking the publishing?

Identified cause in apm https://github.com/atom/apm/commit/c9f021038f847376bff53150f1e2b28362b9981b#diff-2c69f8ac15f464ce4b59338eb9300b3fR358 - investigating fix.

@damieng Thanks for fixing this.

We are getting a lot of issues regarding this since the fix isn't shipped yet: https://github.com/nteract/hydrogen/issues/1137
Is it possible for package authors to just change the package name in package.json to lower case without breaking the upgrade for existing users?

I'm not sure that will solve the problem. I'll see if we can get the hotfixes pushed out asap. Unfortunately hit the holiday period.

I'll see if we can get the hotfixes pushed out asap. Unfortunately hit the holiday period.

Thanks, no problem!
I think in any case we'll try to rename the package to lowercase via apm publish --rename during the next publish.

Was this page helpful?
0 / 5 - 0 ratings