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

At Cannot read property 'PropTypes' of undefined when toggling #103

Closed
vjpr opened this issue Apr 18, 2016 · 9 comments
Closed

At Cannot read property 'PropTypes' of undefined when toggling #103

vjpr opened this issue Apr 18, 2016 · 9 comments

Comments

@vjpr
Copy link

vjpr commented Apr 18, 2016

Atom Version: 1.7.1
System: Mac OS X 10.11.2
Thrown From: advanced-open-file package, v0.15.0

Stack Trace

Failed to activate the advanced-open-file package

At Cannot read property 'PropTypes' of undefined

TypeError: Cannot read property 'PropTypes' of undefined
    at Object.<anonymous> (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:344:103)
    at Object.13.react (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:347:4)
    at s (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:622)
    at /Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:673
    at Object.<anonymous> (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:31:457)
    at Object.1../utils/checkProps (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:34:4)
    at s (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:622)
    at e (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:793)
    at /Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:811
    at a (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:88)
    at Object.<anonymous> (/Users/Vaughan/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:324)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/Vaughan/.atom/packages/advanced-open-file/lib/view.js:4:47)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/Vaughan/.atom/packages/advanced-open-file/lib/controller.js:13:39)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/Vaughan/.atom/packages/advanced-open-file/lib/advanced-open-file.js:9:19)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:715:27)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:173:16)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:795:25
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:20)
    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:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:03.9.0 advanced-open-file:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "closeEmptyWindows": false,
    "customFileTypes": {
      "source.ini": [
        ".buckconfig",
        ".flowconfig"
      ],
      "source.json": [
        ".arcconfig",
        "BUCK.autodeps"
      ],
      "source.python": [
        "BUCK"
      ]
    },
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "markdown-preview-opener",
      "tidy-markdown",
      "markdown-preview",
      "toggle-markdown-task",
      "markdown-writer",
      "tree-view-open-files",
      "ide-flow",
      "atom-terminal",
      "smart-tab-name",
      "git-projects",
      "jsformat",
      "symbol-gen",
      "imdone-atom",
      "imdone-atom-github",
      "linter-flow-plus",
      "terminal-plus",
      "node-debugger",
      "clipboard-history",
      "vim-surround",
      "theme-switcher",
      "enhanced-tabs",
      "emmet",
      "navigate",
      "ide-haskell",
      "custom-folds",
      "atom-ctags",
      "atom-ternjs",
      "es-navigation",
      "symbols-tree-view",
      "tree-view",
      "nuclide",
      "minimap",
      "es-identifier-highlight",
      "move-panes",
      "pane-move-plus",
      "vim-mode-plus-move-to-symbols",
      "js-autoimport"
    ],
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ],
    "packagesWithKeymapsDisabled": [
      "es-identifier-highlight"
    ],
    "themes": [
      "atom-light-ui",
      "vjpr-javascript-syntax"
    ]
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.5.1
advanced-open-file, v0.15.0
atom-html-preview, v0.1.19
atom-import-sort, v0.6.0
atom-wallaby, v1.0.7
atomic-chrome, v0.3.0
autocomplete-modules, v1.4.1
browser-plus, v0.0.60
clang-format, v1.25.0
clipboard-plus, v0.5.1
color-picker, v2.1.1
comment-down, v0.1.1
cursor-history, v0.5.9
docblockr, v0.7.3
editorconfig, v1.3.0
file-icons, v1.7.3
file-types, v0.5.1
foldername-tabs, v0.1.11
git-diff-details, v1.2.0
git-log, v0.4.1
highlight-line, v0.11.1
highlight-selected, v0.11.2
hyperclick, v0.0.35
js-hyperclick, v1.4.2
language-hjson, v0.2.0
language-swift, v0.4.0
last-cursor-position, v0.9.0
linter, v1.11.4
linter-eslint, v7.2.0
linter-flow, v5.1.0
linter-jsonlint, v1.2.3
linter-scss-lint, v2.5.1
markdown-assistant, v0.1.0
markdown-mindmap, v0.2.4
markdown-preview-plus, v2.4.0
markdown-preview-plus-opener, v0.2.0
markdown-scroll-sync, v2.1.2
minimap-git-diff, v4.3.0
minimap-split-diff, v0.3.0
open-recent, v5.0.0
pigments, v0.26.0
project-manager, v2.9.7
react, v0.15.0
sync-settings, v0.7.2
tab-control, v0.6.9
term3, v0.21.4
tree-view-finder, v0.2.1
tree-view-git-branch, v0.1.2
tree-view-git-status, v0.2.3
vjpr-javascript-syntax, v0.0.0
wakatime, v5.0.8
zentabs, v0.8.7

# Dev
No dev packages
@Osmose
Copy link
Owner

Osmose commented Apr 18, 2016

Thanks for the report!

I'm unable to replicate this locally. It looks like an issue with react-for-atom not fetching the React object correctly. A few questions that might help:

  1. Does it consistently happen or is it intermittent?
  2. Do you have a ~/.atom/packages/advanced-open-file/node_modules/react-for-atom directory? If so, what about ~/.atom/packages/advanced-open-file/node_modules/react-for-atom/node_modules/react directory?
  3. Does it persist if you uninstall and reinstall the package?

@vjpr
Copy link
Author

vjpr commented Apr 18, 2016

On Mon, 18 Apr 2016 at 11:47 Michael Kelly notifications@github.com wrote:

Thanks for the report!

I'm unable to replicate this locally. It looks like an issue with
react-for-atom not fetching the React object correctly. A few questions
that might help:

  1. Does it consistently happen or is it intermittent?

Consistently, but only started today.

  1. Do you have a
    ~/.atom/packages/advanced-open-file/node_modules/react-for-atom
    directory? If so, what about
    ~/.atom/packages/advanced-open-file/node_modules/react-for-atom/node_modules/react
    directory?

react-for-atom@15.0.1-0
react@15.0.1

  1. Does it persist if you uninstall and reinstall the package?

Just tried it and it persists. I will double check this again though.
Maybe its something to do with the caching.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#103 (comment)

@agaricus
Copy link

And more

Atom Version: 1.7.1
System: Ubuntu 15.10
Thrown From: advanced-open-file package, v0.15.0

Stack Trace

Failed to activate the advanced-open-file package

At Cannot read property 'PropTypes' of undefined

TypeError: Cannot read property 'PropTypes' of undefined
    at Object.<anonymous> (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:344:103)
    at Object.13.react (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:347:4)
    at s (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:622)
    at /home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:673
    at Object.<anonymous> (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:31:457)
    at Object.1../utils/checkProps (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:34:4)
    at s (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:622)
    at e (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:793)
    at /home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:811
    at a (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:88)
    at Object.<anonymous> (/home/agaricus/.atom/packages/advanced-open-file/vendor/react-infinite.js:29:324)
    at Module._compile (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/usr/share/atom/resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/home/agaricus/.atom/packages/advanced-open-file/lib/view.js:4:47)
    at Module._compile (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/usr/share/atom/resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/home/agaricus/.atom/packages/advanced-open-file/lib/controller.js:13:39)
    at Module._compile (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/usr/share/atom/resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/home/agaricus/.atom/packages/advanced-open-file/lib/advanced-open-file.js:9:19)
    at Module._compile (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/usr/share/atom/resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (/usr/share/atom/resources/app.asar/src/package.js:715:27)
    at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:173:16)
    at /usr/share/atom/resources/app.asar/src/package.js:795:25
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:241:20)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/usr/share/atom/resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:00.8.0 advanced-open-file:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "disabledPackages": [
      "linter-eslint",
      "nuclide-file-tree",
      "nuclide-file-watcher",
      "nuclide-flow",
      "nuclide-hack",
      "nuclide-hg-repository",
      "nuclide-language-hack",
      "nuclide-quick-open",
      "nuclide-remote-projects",
      "nuclide-type-hint",
      "fonts",
      "atom-json-editor",
      "atom-terminal",
      "json-schema"
    ],
    "themes": [
      "one-dark-ui",
      "atom-material-syntax"
    ]
  }
}

Installed Packages

# User
advanced-open-file, v0.15.0
atom-beautify, v0.29.4
atom-material-syntax, v0.4.6
atom-typescript, v8.8.1
atom-wallaby, v1.0.7
atom-yeoman, v0.3.15
build, v0.59.0
build-gulp, v0.7.0
build-npm-apm, v0.10.0
docblockr, v0.7.3
editorconfig, v1.3.0
hyperclick, v0.0.35
language-babel, v2.17.3
last-cursor-position, v0.9.0
linter, v1.11.4
linter-jsonlint, v1.2.3
linter-less, v2.4.2
linter-pep8, v1.2.1
linter-tslint, v0.9.1
minimap, v4.22.1
pain-split, v1.4.0
pigments, v0.26.0
pretty-json, v1.0.3
terminal-plus, v0.14.5
travis-ci-status, v1.0.0

# Dev
No dev packages

@Osmose
Copy link
Owner

Osmose commented Apr 18, 2016

I wonder if this is a dupe of #104? Or at least related to the issues with react-for-atom.

I'm reverting 0.15.0 and going to investigate this more closely.

@Osmose
Copy link
Owner

Osmose commented Apr 19, 2016

I've published 0.16.1, which re-adds the React rewrite and uses React directly. I can confirm it coexists fine with packages using react-for-atom, but I didn't have any React-using packages on hand to confirm if it avoids the supposed issues with multiple Reacts on a single page.

However, as far as I can tell from other posts, multiple Reacts only breaks if components between them mix, which, as I understand it, shouldn't happen with Atom packages in general.

Can ya'll get the latest version and test if it works?

@Minoost
Copy link

Minoost commented Apr 19, 2016

Works for me! :D

@agaricus
Copy link

works for me

@Osmose
Copy link
Owner

Osmose commented Apr 19, 2016

Hooray! Now we wait to see if anyone reports a new issue!

Thanks all!

@Osmose Osmose closed this as completed Apr 19, 2016
@ssorallen
Copy link

It looks like the issue is that you have hyperclick, v0.0.35 installed. The standalone 'hyperclick' package is no longer supported.

Hyperclick imports an outdated version of react-for-atom that exports React as the default, something like module.exports = require('react');. Newer versions of react-for-atom export an object with with React as a property, like module.exports = {react: require('react')};. Hyperclick appears to be loading first, assigning to the react-for-atom singleton, and advanced-open-file is getting a reference to React rather than an Object with React as a property.

This shouldn't be an issue that package authors like @Osmose should have to deal with though. I'm bringing this up with @zertosh to see how we can make this go away.

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

5 participants