danielbayley / atom-modular-snippets

:atom: A modular solution to snippets in @Atom.
https://atom.io/packages/modular-snippets
MIT License
9 stars 4 forks source link

Uncaught Error: Cannot find module 'atom-space-pen-views' #7

Closed artdevjs closed 7 years ago

artdevjs commented 7 years ago

I got this error calling the commands from package-manager-commands

Atom: 1.16.0-beta0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.3 Thrown From: modular-snippets package 0.1.3

Stack Trace

Uncaught Error: Cannot find module '/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views'

At /Applications/Atom Beta.app/Contents/Resources/app.asar/src/module-cache.js:379

Error: Cannot find module '/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views'
    at Module._resolveFilename (module.js:455:15)
    at Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._resolveFilename (/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:403:25)
    at Function.Module._load (/packages/modular-snippets/node_modules/require-cson/register.js:9:15)
    at Module.require (module.js:483:17)
    at require (/app.asar/src/native-compile-cache.js:50:27)
    at /packages/package-manager-commands/lib/package-list-view.coffee:1:20)
    at /packages/package-manager-commands/lib/package-list-view.coffee:1:1)
    at Module._compile (/app.asar/src/native-compile-cache.js:109:30)
    at /app.asar/src/compile-cache.js:216:21)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Function.Module._load (/packages/modular-snippets/node_modules/require-cson/register.js:9:15)
    at Module.require (module.js:483:17)
    at require (/app.asar/src/native-compile-cache.js:50:27)
    at Object.openDisablePackageMenu (/packages/package-manager-commands/lib/main.coffee:125:24)
    at /packages/package-manager-commands/lib/main.coffee:94:93)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at Object.didConfirmSelection (/app.asar/node_modules/command-palette/lib/command-palette-view.js:92:28)
    at SelectListView.confirmSelection (/app.asar/node_modules/atom-select-list/src/select-list-view.js:292:20)
    at /app.asar/node_modules/atom-select-list/src/select-list-view.js:64:14)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -0:10.1.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-ocean-dark-syntax.theme-nord-atom-ui)
     -0:04.3.0 command-palette:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:02.4.0 core:confirm (input.hidden-input)
     -0:02.4.0 package-manager:disable-package (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:01.9.0 tool-panel:unfocus (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Non-Core Packages

advanced-open-file 0.16.6 
atom-beautify 0.29.17 
atom-markdown-auto-preview 1.1.1 
atom-ternjs 0.18.2 
atomizr 0.23.1 
auto-detect-indentation 1.3.0 
autocomplete-bash-builtins 0.3.5 
autocomplete-lua 0.8.0 
autoupdate-packages 1.3.1 
block-and-line-comment 0.4.0 
bracket-padder 0.4.1 
build 0.67.0 
build-osa 0.7.1 
busy 0.7.0 
busy-signal 1.3.0 
command-toolbar 1.0.12 
dash 1.7.1 
dbclick-tree-view 1.3.0 
Delete-Whitelines 0.6.3 
edit-in-new-tab 0.9.1 
editorconfig 2.2.2 
emmet 2.4.3 
file-header 1.13.3 
file-icons 2.0.17 
find-and-till 1.0.2 
fold-comments 0.6.0 
fold-lines 0.2.2 
format-shell 2.0.0 
fuzzy-finder-with-faster-loading 0.1.0 
fuzzyfilepath 1.0.4 
haskell-grammar 0.4.0 
history-tracker 0.1.0 
Hydrogen 1.6.0 
intentions 1.1.2 
jumpy 3.1.3 
keybinding-cheatsheet 0.1.1 
language-applescript 0.3.0 
language-babel undefined 
language-diff 0.7.0 
language-gitignore 0.3.0 
language-graphql 0.8.0 
language-homebrew-formula 1.0.4 
language-ini 1.19.0 
language-javascript-jxa 0.2.8 
language-json-comments 0.16.3 
language-log 1.8.0 
language-lua 0.9.11 
language-markdown 0.20.0 
language-ocaml 1.1.2 
language-pug-jade 0.1.2 
language-restructuredtext 1.0.2 
language-svg 0.9.2 
language-swift 0.5.0 
language-thrift 1.0.2 
language-tmux 0.4.0 
language-todofile 0.1.1 
language-unix-shell 0.40.1 
language-viml 1.1.3 
language-zsh 0.0.0 
lines 0.13.1 
linter 2.1.0 
linter-eslint 8.1.4 
linter-lua 1.0.2 
linter-markdown 3.1.0 
linter-shellcheck 1.4.3 
linter-stylelint 3.9.0 
linter-ui-default 1.2.1 
make-executable 0.1.1 
markdown-preview-enhanced 0.10.8 
markdown-scroll-sync 2.1.2 
modular-keymaps 0.1.5 
modular-snippets 0.1.3 
multi-cursor 2.1.5 
next-line-comment 0.2.1 
nord-atom-syntax 0.6.0 
nord-atom-ui 0.10.2 
nucleus-dark-ui 0.11.0 
nuclide undefined 
nuclide-format-js 0.0.36 
ocean-dark-syntax 0.2.3 
open-recent 5.0.0 
open-terminal-here 2.3.0 
package-list 0.1.2 
package-manager-commands 2.0.3 
package-settings 1.1.0 
package-sync 1.1.0 
pane-manager 1.0.1 
pigments 0.39.1 
project-viewer 1.0.9 
promote-folder-to-project 2.0.1 
quick-highlight 0.8.1 
remember-file-positions 0.2.2 
remember-folds 0.3.0 
rst-preview 1.3.1 
scaffolding 1.1.0 
script 3.14.1 
smart-backspace 0.2.3 
snippet-generator 0.3.2 
sort-lines 0.14.0 
ssh-config 0.10.1 
Sublime-Style-Column-Selection 1.7.4 
svg-preview 0.11.0 
svgo undefined 
tabularize 0.2.5 
tool-bar 1.1.0 
tree-view-full-width 0.1.0 
vim-mode-plus 0.84.1 
wakatime 6.0.13 
danielbayley commented 7 years ago

Well that's odd considering this package doesn't use atom-space-pen-views at all… there's no view!

@artdevjs What command specifically did you run from package-manager-commands that threw this?

artdevjs commented 7 years ago

Running of any of the commands gives the same result, I also noticed that this happens only in Atom Beta, in stable Atom everything works fine. Here is how it looks https://gfycat.com/TeemingGargantuanKouprey

danielbayley commented 7 years ago

I also noticed that this happens only in Atom Beta

🤔 Well I am also running Atom Beta but don't use package-manager-commands

@artdevjs I'm thinking that the issue is probably that since, IIRC, the Atom team wants to eventually stop depending on particular frameworks, in this case space-pen-views… So they may have removed that particular resource (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views that the error is complaining about) in beta, which package-manager-commands seems to be relying on, without actually listing it as a dependency in their package.json. Therefore I'm fairly certain the issue is with that package and not mine.

I have no idea why the error is being thrown from this one, since, as I say there is no view (hence no space-pen-view) involved…

So I would open an issue on package-manager-commands… Closing for now, but let me know how you get on.

artdevjs commented 7 years ago

Thank's for a detailed answer. It seems that project is dead, as a temporary workaround I'll try to fork and reinstall package-manager-commands with necessary dependencies.