hughsk / atom-npm-install Goto Github PK
View Code? Open in Web Editor NEWAutomatically install and save any missing npm modules being used in the current file
Home Page: http://atom.io/packages/npm-install
License: MIT License
Automatically install and save any missing npm modules being used in the current file
Home Page: http://atom.io/packages/npm-install
License: MIT License
[Enter steps to reproduce below:]
Atom Version: 0.192.0
System: Microsoft Windows 8.1 Pro
Thrown From: npm-install package, v2.0.0
Uncaught Error: not found
At C:\Users\Abdul Hannan Ali\.atom\packages\npm-install\node_modules\findup\index.js:94
Error: not found
at Function.module.exports.sync (C:\Users\Abdul Hannan Ali\.atom\packages\npm-install\node_modules\findup\index.js:94:9)
at atom-workspace.<anonymous> (C:\Users\Abdul Hannan Ali\.atom\packages\npm-install\index.js:104:24)
at atom-workspace.handler (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\src\space-pen-extensions.js:115:32)
at atom-workspace.jQuery.event.dispatch (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\node_modules\space-pen\vendor\jquery.js:4681:9)
at atom-workspace.elemData.handle (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\node_modules\space-pen\vendor\jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\src\command-registry.js:238:29)
at C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\src\command-registry.js:3:61
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\node_modules\command-palette\lib\command-palette-view.js:120:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\node_modules\atom-space-pen-views\lib\select-list-view.js:338:21)
at space-pen-div.atom.commands.add.core:confirm (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\node_modules\atom-space-pen-views\lib\select-list-view.js:109:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\src\command-registry.js:238:29)
at C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\src\command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:519:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:354:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (C:\Users\Abdul Hannan Ali\AppData\Local\atom\app-0.192.0\resources\app\src\window-event-handler.js:180:20)
-0:30.3 core:move-left (atom-text-editor.editor)
-0:30.1 editor:newline (atom-text-editor.editor)
-0:29.8 core:move-up (atom-text-editor.editor)
2x -0:24.1 core:move-right (atom-text-editor.editor)
-0:23.3 turbo-javascript:end-line (atom-text-editor.editor)
-0:22.9 core:save (atom-text-editor.editor)
-0:22.8 editor:newline-below (atom-text-editor.editor)
-0:21.2 core:save (atom-text-editor.editor)
-0:19.1 command-palette:toggle (atom-text-editor.editor)
-0:17.3 core:confirm (atom-text-editor.editor.mini)
-0:17.3 npm-install:save (atom-text-editor.editor)
-0:05.7 command-palette:toggle (atom-text-editor.editor)
-0:03.5 core:backspace (atom-text-editor.editor.mini)
-0:02.9 core:move-down (atom-text-editor.editor.mini)
-0:02.6 core:confirm (atom-text-editor.editor.mini)
-0:02.6 npm-install:save-dev (atom-text-editor.editor)
{
"core": {
"themes": [
"atom-dark-ui",
"monokai"
]
}
}
# User
atom-handlebars, v0.4.0
atom-runner, v2.3.0
atom-terminal, v0.7.0
autocomplete-plus, v2.6.0
color-picker, v1.5.0
javascript-snippets, v1.0.0
linter, v0.12.0
linter-jshint, v0.1.0
minimap, v4.6.0
monokai, v0.12.0
npm-install, v2.0.0
pretty-json, v0.3.2
turbo-javascript, v0.0.8
# Dev
No dev packages
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app.asar/src/atom.js:57:13)
Object.activate (/Users/rmeno3/.atom/packages/npm-install/index.js:36:7)
Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:238:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:772:25)
Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:219:20)
Issue: when the required package is quoted by backtick, e.g. var express = require(`express`);
in ES6 template string syntax, atom-npm-install
will give a Nothing to install! message, instead of installing the required package. Changing the backticks to single quotes and atom-npm-install
will recognize them and install correctly.
Steps to reproduce:
npm init
with default settings;index.js
;index.js
:var express = require(`express`);
Npm Install: Save
from Atom command palette.Expected result: express
installed and added to package.json
Actual result: A new panel opened in Atom that says npm install Nothing to install!
Environment:
Atom 1.25.1 x64
npm-install 4.0.4
[Enter steps to reproduce below:]
Atom Version: 0.194.0
System: Mac OS X 10.10.3
Thrown From: npm-install package, v2.0.0
Uncaught TypeError: Cannot read property 'getBuffer' of undefined
At /Users/sanket/.atom/packages/npm-install/index.js:72
TypeError: Cannot read property 'getBuffer' of undefined
at atom-workspace.<anonymous> (/Users/sanket/.atom/packages/npm-install/index.js:72:22)
at atom-workspace.handler (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:115:32)
at atom-workspace.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:120:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:178:20)
5x -1:39.2.0 core:backspace (atom-text-editor.editor.mini)
-1:36.3.0 core:confirm (atom-text-editor.editor.mini)
-1:09.3.0 core:select-all (atom-text-editor.editor.mini)
2x -1:05.5.0 core:confirm (atom-text-editor.editor.mini)
-0:30.4.0 core:close (div.settings-view.pane-item)
-0:28.4.0 command-palette:toggle (atom-pane.pane.active)
-0:26 core:confirm (atom-text-editor.editor.mini)
-0:26 bower-install:save (atom-pane.pane.active)
-0:14.9.0 command-palette:toggle (atom-pane.pane.active)
-0:13.9.0 core:backspace (atom-text-editor.editor.mini)
-0:12 core:confirm (atom-text-editor.editor.mini)
-0:12 composer:install (atom-pane.pane.active)
-0:04.0 command-palette:toggle (atom-pane.pane.active)
-0:02.4.0 core:move-down (atom-text-editor.editor.mini)
-0:01.4.0 core:confirm (atom-text-editor.editor.mini)
-0:01.4.0 npm-install:save (atom-pane.pane.active)
{
"core": {
"themes": [
"seti-ui",
"seti-syntax"
]
}
}
# User
angularjs, v0.2.0
atom-beautify, v0.24.1
autoclose-html, v0.15.0
autocomplete-css, v0.6.0
autocomplete-html, v0.5.0
autocomplete-plus, v2.12.0
bower-install, v0.2.4
change-case, v0.5.1
color-picker, v1.7.0
composer, v0.3.1
language-blade, v0.12.0
laravel, v0.4.2
linter, v0.12.1
linter-php, v0.0.12
markdown-scroll-sync, v0.3.3
npm-install, v2.0.0
save-session, v0.14.0
seti-syntax, v0.4.0
seti-ui, v0.6.3
todo-show, v0.8.0
# Dev
No dev packages
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app.asar/src/atom.js:57:13)
Object.activate (/Users/rmeno3/.atom/packages/npm-install/index.js:35:7)
Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:238:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:772:25)
Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:219:20)
Call ::getActiveTextEditor instead
Workspace.getActiveEditor (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:1022:12)
atom-workspace.<anonymous> (/Users/rmeno3/.atom/packages/npm-install/index.js:68:37)
atom-workspace.handler (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:115:32)
atom-workspace.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
atom-workspace.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
[Enter steps to reproduce below:]
var ExtractTextPlugin = require("extract-text-webpack-plugin")
Atom Version: 1.12.7
Electron Version: 1.3.13
System: Mac OS X 10.12.2
Thrown From: npm-install package, v4.0.3
Uncaught TypeError: core.indexOf is not a function
At /Users/Nicolas/.atom/packages/npm-install/index.js:96
TypeError: core.indexOf is not a function
at /Users/Nicolas/.atom/packages/npm-install/index.js:96:21
at Array.filter (native)
at /Users/Nicolas/.atom/packages/npm-install/index.js:95:10
at FindUp.<anonymous> (/Users/Nicolas/.atom/packages/npm-install/node_modules/findup/index.js:38:7)
at emitOne (events.js:96:13)
at FindUp.emit (events.js:188:7)
at /Users/Nicolas/.atom/packages/npm-install/node_modules/findup/index.js:64:12
at FSReqWrap.cb [as oncomplete] (fs.js:257:19)
-1:17.2.0 core:move-right (atom-text-editor.editor.is-focused)
2x -1:16.8.0 core:backspace (atom-text-editor.editor.is-focused)
-1:11.9.0 core:move-right (atom-text-editor.editor.is-focused)
-1:11.2.0 core:move-left (atom-text-editor.editor.is-focused)
-1:10.9.0 core:move-right (atom-text-editor.editor.is-focused)
3x -1:08.2.0 core:backspace (atom-text-editor.editor.is-focused)
2x -0:57.6.0 editor:newline (atom-text-editor.editor.is-focused)
2x -0:57.2.0 core:move-up (atom-text-editor.editor.is-focused)
3x -0:44.8.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
-0:31.8.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused.autocomplete-active)
-0:31 core:undo (atom-text-editor.editor.is-focused)
5x -0:23.5.0 core:backspace (atom-text-editor.editor.is-focused)
-0:13.2.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:08.9.0 core:move-down (atom-text-editor.editor.mini.is-focused)
-0:08.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:08.1.0 npm-install:save-dev (atom-text-editor.editor)
{
"core": {
"telemetryConsent": "limited",
"themes": [
"atom-dark-ui",
"sub-monokai"
]
}
}
# User
atom-clock, v0.1.2 (active)
npm-install, v4.0.3 (active)
platformio-ide-terminal, v2.2.2 (active)
sub-monokai, v1.0.0 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (active)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.45.0 (inactive)
base16-tomorrow-dark-theme, v1.3.0 (inactive)
base16-tomorrow-light-theme, v1.3.0 (inactive)
one-dark-ui, v1.6.2 (inactive)
one-light-ui, v1.6.2 (inactive)
one-dark-syntax, v1.5.0 (inactive)
one-light-syntax, v1.5.0 (inactive)
solarized-dark-syntax, v1.0.5 (inactive)
solarized-light-syntax, v1.0.5 (inactive)
about, v1.7.0 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.13.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.4 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.2 (active)
command-palette, v0.39.0 (active)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.202.2 (active)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.158.8 (active)
metrics, v1.1.2 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.1 (inactive)
settings-view, v0.243.1 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.4 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.2 (active)
symbols-view, v0.113.1 (active)
tabs, v0.103.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.210.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.0 (active)
language-csharp, v0.13.0 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.47.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)
# Dev
No dev packages
[Enter steps to reproduce below:]
Atom Version: 0.190.0
System: Mac OS X 10.10.2
Thrown From: npm-install package, v2.0.0
Failed to activate the npm-install package
At Cannot read property 'command' of undefined
TypeError: Cannot read property 'command' of undefined
at Object.activate (/Users/systemr/.atom/packages/npm-install/index.js:29:21)
at Package.module.exports.Package.activateNow (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/package.js:225:19)
at /Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/package.js:206:30
at Package.module.exports.Package.measure (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/package.js:152:15)
at Package.module.exports.Package.activate (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/package.js:199:14)
at PackageManager.module.exports.PackageManager.activatePackage (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/package-manager.js:435:21)
at /Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/package-manager.js:419:29
at Config.module.exports.Config.transact (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/config.js:302:16)
at PackageManager.module.exports.PackageManager.activatePackages (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/package-manager.js:414:19)
at PackageManager.module.exports.PackageManager.activate (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/package-manager.js:395:46)
at Atom.module.exports.Atom.startEditorWindow (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/atom.js:634:21)
at Object.<anonymous> (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/window-bootstrap.js:12:8)
at Object.<anonymous> (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/window-bootstrap.js:23:4)
at Module._compile (module.js:452:26)
at Object.loadFile [as .js] (/Users/systemr/Downloads/Atom.app/Contents/Resources/app/src/babel.js:162:21)
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at window.onload (file:///Users/systemr/Downloads/Atom.app/Contents/Resources/app/static/index.js:54:25)
{
"core": {
"themes": [
"one-dark-ui",
"one-dark-syntax"
]
}
}
# User
npm-install, v2.0.0
# Dev
No dev packages
In styles/npm-install.less: Use the selector atom-panel
instead of the tool-panel
class.
wouldn't it make a little more sense to use npm.install: https://github.com/npm/npm/blob/master/doc/api/npm-install.md
instead of spawning a new process?
I get an Error: spawn ENOENT
when trying to run this plugin.
ignore atom module when write atom package
If I try to install '@hyperdivision/btc-transaction-tail' I get the following log output:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '$HOME/.nvm/versions/node/v12.13.0/bin/node',
1 verbose cli '$HOME/.nvm/versions/node/v12.13.0/bin/npm',
1 verbose cli 'install',
1 verbose cli '--save',
1 verbose cli '--color=always',
1 verbose cli '@hyperdivision'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 09bb8d1c5b3beae2
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 timing stage:rollbackFailedOptional Completed in 1ms
8 timing stage:runTopLevelLifecycles Completed in 90ms
9 verbose stack Error: Invalid tag name "@hyperdivision": Tags may not have any characters that encodeURIComponent encodes.
9 verbose stack at invalidTagName ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:91:15)
9 verbose stack at fromRegistry ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:296:13)
9 verbose stack at resolve ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:81:12)
9 verbose stack at npa ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:52:10)
9 verbose stack at $HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/lib/install/deps.js:222:14
9 verbose stack at $HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
9 verbose stack at Array.forEach (<anonymous>)
9 verbose stack at $HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
9 verbose stack at Array.forEach (<anonymous>)
9 verbose stack at asyncMap ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
9 verbose stack at exports.getAllMetadata ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/lib/install/deps.js:219:3)
9 verbose stack at Installer.loadArgMetadata ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/lib/install.js:360:3)
9 verbose stack at $HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/lib/install.js:695:16
9 verbose stack at $HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/lib/install/read-shrinkwrap.js:34:16
9 verbose stack at tryCatcher ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
9 verbose stack at Promise._settlePromiseFromHandler ($HOME/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31)
10 verbose cwd $HOME/development/dev
11 verbose Darwin 18.7.0
12 verbose argv "$HOME/.nvm/versions/node/v12.13.0/bin/node" "$HOME/.nvm/versions/node/v12.13.0/bin/npm" "install" "--save" "--color=always" "@hyperdivision"
13 verbose node v12.13.0
14 verbose npm v6.12.0
15 error code EINVALIDTAGNAME
16 error Invalid tag name "@hyperdivision": Tags may not have any characters that encodeURIComponent encodes.
17 verbose exit [ 1, true ]
It seems that the string is split?
using npm init -f or like
Argument to path.dirname
must be a string
Object.dirname (C:\Users\W10\AppData\Local\atom\app-1.21.1\resources\app.asar\src\electron-shims.js:9:10)
HTMLElement.<anonymous> (C:\Users\W10\.atom\packages\npm-install\index.js:71:27)
CommandRegistry.handleCommandEvent (<embedded>:22275:36)
CommandRegistry.dispatch (<embedded>:22160:23)
AtomEnvironment.dispatchApplicationMenuCommand (<embedded>:1586:34)
EventEmitter.outerCallback (<embedded>:2038:31)
davide@davidell:~/Desktop/app/atom/atom$ npm install
[email protected] install /home/davide/Desktop/app/atom/atom/node_modules/oniguruma
node-gyp rebuild
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 403 response downloading https://atom.io/download/atom-shell/v5.4.1/node-v5.4.1-headers.tar.gz
gyp ERR! stack at Request. (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:244:14)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:169:7)
gyp ERR! stack at Request.onRequestResponse (/usr/lib/node_modules/npm/node_modules/request/request.js:998:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:169:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:425:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack at Socket.socketOnData (_http_client.js:315:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Linux 4.2.0-23-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/davide/Desktop/app/atom/atom/node_modules/oniguruma
gyp ERR! node -v v5.4.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 4.2.0-23-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v5.4.1
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the oniguruma package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls oniguruma
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/davide/Desktop/app/atom/atom/npm-debug.log
Line 23 in 6d3646a
On windows ctrl-alt-i is the default binding for toggling dev tools. Personally I wouldn't mind no bindings by default (command palette is fine for this).
Hi,
On windows the npm executable file is npm.cmd,
I fixed the package locally using:
line 14 + var platform = require('os').platform
line 28 + var npmExecutable = (platform() === "win32" ? "npm.cmd" : "npm")
line 138 - npm = spawn('npm', [
line 138 + npm = spawn(npmExecutable, [
Sorry the manal patch I'm new to atom, I guess there is a way to generate a fork + pull request from the package easily from atom since it's a github product but I'm a bit in a hurry.
If you do not have an package.json yet, rather than something useful like "package.json not found", it just says "not found" as an error.
It was leading me to believe it couldn't find the package in the registry, rather than not able to find package.json at all.
Hi,
I have macosx, so I change the npm install path in your plugin to /usr/local/lib/node_modules/npm (my path)
It's still doesn't found npm
Thanks for your help
[Enter steps to reproduce below:]
Atom Version: 1.0.3
System: Mac OS X 10.10.4
Thrown From: npm-install package, v4.0.1
Uncaught TypeError: Cannot read property 'getPath' of undefined
At /Users/kapil_shrivastava/.atom/packages/npm-install/index.js:69
TypeError: Cannot read property 'getPath' of undefined
at atom-workspace.<anonymous> (/Users/kapil_shrivastava/.atom/packages/npm-install/index.js:69:28)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/kapil_shrivastava/Downloads/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
at CommandRegistry.handleCommandEvent (/Users/kapil_shrivastava/Downloads/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Users/kapil_shrivastava/Downloads/Atom.app/Contents/Resources/app.asar/src/command-registry.js:156:19)
at EventEmitter.<anonymous> (/Users/kapil_shrivastava/Downloads/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:70:30)
at emitOne (events.js:77:13)
at EventEmitter.emit (events.js:166:7)
-1:50.6.0 application:open (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
-1:26.4.0 core:backspace (atom-text-editor.editor.mini.is-focused)
3x -1:26.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:19 core:backspace (atom-text-editor.editor.mini.is-focused)
-0:00.7.0 npm-install:save (atom-text-editor.editor.mini.is-focused)
{}
# User
npm-install, v4.0.1
# Dev
No dev packages
Issue description: when using async
/await
keyword in code, atom-npm-install
will prompt "Unexpected token" and refuse to process the dependencies in the file.
Steps to reproduce:
npm init
with default settings;index.js
;index.js
:var express = require('express');
async function main() {
var a = new Promise(
(resolve, reject) => {
setTimeout(resolve, 1000, 'Hello World!');
}
);
console.log(a);
console.log(await a);
return a;
}
main();
Npm Install: Save
from Atom command palette.Expected result: express
installed and added to package.json
Actual result: A new panel opened in Atom that says npm install 3: Unexpected token (3:6)
Environment:
Atom 1.25.1 x64
npm-install 4.0.4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.