Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

clean up PropType warnings in the console. #1557

Closed
annthurium opened this issue Jun 28, 2018 · 7 comments
Closed

clean up PropType warnings in the console. #1557

annthurium opened this issue Jun 28, 2018 · 7 comments
Labels
code-cleanup 🔧 good first issue papercut Small-scope issues and bugs we can use to backfill our sprint plans

Comments

@annthurium
Copy link
Contributor

on a clean branch synced to master, today I saw these warnings:

screen shot 2018-06-28 at 11 12 54 am

If props are not required, we should not mark them as required. And if they are required, we should pass them.

@mansisce
Copy link

mansisce commented Aug 8, 2018

can i pick this up towards my first contribution?

@smashwilson
Copy link
Contributor

@mansisce Absolutely!

The specific warnings have changed slightly since this was filed, but we still have a few on master:

/Applications/Atom Nightly.app/Contents/Resources/app.asar/node_modules/prop-types/checkPropTypes.js:19 Warning: Failed prop type: The prop `aheadCount` is marked as required in `GitHubTabController`, but its value is `null`.
    in GitHubTabController (created by ObserveModel)
    in ObserveModel (created by GitHubTabContainer)
    in GitHubTabContainer (created by GitHubTabItem)
    in GitHubTabItem (created by PaneItem)
    in PaneItem (created by RootController)
    in RootController
printWarning @ /Applications/Atom Nightly.app/Contents/Resources/app.asar/node_modules/prop-types/checkPropTypes.js:19
/Applications/Atom Nightly.app/Contents/Resources/app.asar/node_modules/prop-types/checkPropTypes.js:19 Warning: Failed prop type: The prop `aheadCount` is marked as required in `GitHubTabView`, but its value is `null`.
    in GitHubTabView (created by GitHubTabController)
    in GitHubTabController (created by ObserveModel)
    in ObserveModel (created by GitHubTabContainer)
    in GitHubTabContainer (created by GitHubTabItem)
    in GitHubTabItem (created by PaneItem)
    in PaneItem (created by RootController)
    in RootController

I see these two ☝️ specifically when I open a repo that has no remotes. And of course if you see any others we'd gladly merge PRs that clean them up!

@annthurium
Copy link
Contributor Author

yay, thanks @mansisce ! If you need help or run into any problems, at mention me or @smashwilson and we're happy to give some guidance.

@pmj642
Copy link

pmj642 commented Aug 21, 2018

@annthurium @smashwilson
How do I reproduce this one on Windows?
I've cloned atom/atom repo locally and able to run it in --dev mode although I'm not able to successfully run script/bootstrap.

I'm getting this:

PS C:\Users\pmj64\Documents\GitHub\atom> script/bootstrap -v
Node: v8.11.2
Npm: v5.6.0
Python: v2.7.15
Installing script dependencies
Installing apm
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\pmj64\Documents\GitHub\atom\apm\node_modules\atom-package-manager\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Users\pmj64\Documents\GitHub\atom\apm\node_modules\atom-package-manager\bin\node.exe" "C:\Users\pmj64\Documents\GitHub\atom\apm\node_modules\atom-package-manager\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\pmj64\Documents\GitHub\atom\apm\node_modules\atom-package-manager\node_modules\oniguruma
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! oniguruma@6.2.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oniguruma@6.2.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pmj64\AppData\Roaming\npm-cache_logs\2018-08-21T08_10_26_902Z-debug.log

gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@8.9.3 | win32 | x64
gyp http GET https://atom.io/download/electron/v2.0.7/iojs-v2.0.7.tar.gz
gyp http 200 https://atom.io/download/electron/v2.0.7/iojs-v2.0.7.tar.gz
gyp http GET https://atom.io/download/electron/v2.0.7/SHASUMS256.txt
gyp http GET https://atom.io/download/electron/v2.0.7/win-x64/iojs.lib
gyp http GET https://atom.io/download/electron/v2.0.7/win-x86/iojs.lib
gyp http 200 https://atom.io/download/electron/v2.0.7/win-x86/iojs.lib
gyp http 200 https://atom.io/download/electron/v2.0.7/SHASUMS256.txt
gyp http 200 https://atom.io/download/electron/v2.0.7/win-x64/iojs.lib
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at _errnoException (util.js:1024:11)
gyp ERR! stack at TLSWrap.onread (net.js:615:25)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Users\pmj64\Documents\GitHub\atom\apm\node_modules\atom-package-manager\bin\node.exe" "C:\Users\pmj64\Documents\GitHub\atom\apm\node_modules\atom-package-manager\node_modules\node-gyp\bin\node-gyp.js" "install" "--runtime=electron" "--target=2.0.7" "--dist-url=https://atom.io/download/electron" "--arch=x64" "--ensure"
gyp ERR! cwd C:\Users\pmj64.atom
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

child_process.js:624
throw err;
^

Error: Command failed: C:\Users\pmj64\Documents\GitHub\atom\apm\node_modules\atom-package-manager\bin\apm.cmd --loglevel=error install
at checkExecSyncError (child_process.js:601:13)
at Object.execFileSync (child_process.js:621:13)
at module.exports (C:\Users\pmj64\Documents\GitHub\atom\script\lib\run-apm-install.js:14:16)
at Object. (C:\Users\pmj64\Documents\GitHub\atom\script\bootstrap:43:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)

Thanks.

@smashwilson
Copy link
Contributor

From this:

gyp ERR! install error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at _errnoException (util.js:1024:11)
gyp ERR! stack at TLSWrap.onread (net.js:615:25)

It looks like your connection to atom.io is being interrupted while apm is trying to download the Electron headers to build native dependencies. I'm not sure why this might be happening, though, especially because the four requests immediately above it seem to be completing fine.

Are you behind a proxy, by any chance?


But! You shouldn't actually need to build Atom yourself to test out changes to this package. atom/github is bundled and snapshotted into Atom, but for changes like this one, you don't need to do all of that. You should be able to work by linking your atom/github repository in dev mode:

PS C:\Users\pmj64\Documents\GitHub\github>apm link --dev .

Now, when you launch Atom in dev mode, the github package working directory will be loaded instead of the bundled version.

@pmj642
Copy link

pmj642 commented Aug 23, 2018

Hey, I was able to link the package in dev mode and on running atom in dev mode I'm getting different errors in the console, and not the ones mentioned.

image

Uncaught Error: Cannot find module '../src/pane-element.js'
at Module._resolveFilename (module.js:543:15)
at Module._resolveFilename (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\common\reset-search-paths.js:35:12)
at Function.Module._resolveFilename (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\src\module-cache.js:350:52)
at Function.Module._load (module.js:473:25)
at Module.require (module.js:586:17)
at require (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\src\native-compile-cache.js:47:27)
at customRequire (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\static<embedded>:96:26)
at get_PaneElement (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\pane.js:8:45)
at Pane.getElement (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\pane.js:95:33)
at ViewRegistry.createView (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\view-registry.js:138:30)
at ViewRegistry.getView (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\view-registry.js:127:25)
at BackgroundTipsElement.attach (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:48:33)
at BackgroundTipsElement.start (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:81:10)
at BackgroundTipsElement.startTimeout.setTimeout (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:36:47)
module.js:543 Uncaught Error: Cannot find module '../src/pane-element.js'
at Module._resolveFilename (module.js:543:15)
at Module._resolveFilename (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\common\reset-search-paths.js:35:12)
at Function.Module._resolveFilename (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\src\module-cache.js:350:52)
at Function.Module._load (module.js:473:25)
at Module.require (module.js:586:17)
at require (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\src\native-compile-cache.js:47:27)
at customRequire (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\static<embedded>:96:26)
at get_PaneElement (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\pane.js:8:45)
at Pane.getElement (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\pane.js:95:33)
at ViewRegistry.createView (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\view-registry.js:138:30)
at ViewRegistry.getView (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\view-registry.js:127:25)
at BackgroundTipsElement.attach (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:48:33)
at BackgroundTipsElement.start (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:81:10)
at BackgroundTipsElement.updateVisibility (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:65:12)
at visibilityCallback (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:24:43)
at CallbacksRegistry.apply (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\common\api\callbacks-registry.js:47:25)
at EventEmitter.ipcRenderer.on (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\renderer\api\remote.js:277:21)
at emitMany (events.js:147:13)
at EventEmitter.emit (events.js:224:7)
Module._resolveFilename @ module.js:543
Module._resolveFilename @ C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\common\reset-search-paths.js:35
Module._resolveFilename @ module-cache.coffee:245
Module._load @ module.js:473
Module.require @ module.js:586
require @ C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\src\native-compile-cache.js:47
customRequire @ commitCommentContainer_item.graphql.js:111
get_PaneElement @ commitCommentContainer_item.graphql.js:112
getElement @ commitCommentContainer_item.graphql.js:112
createView @ commitCommentContainer_item.graphql.js:112
getView @ commitCommentContainer_item.graphql.js:112
attach @ C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:48
start @ C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:81
updateVisibility @ C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:65
visibilityCallback @ C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:24
apply @ C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\common\api\callbacks-registry.js:47
ipcRenderer.on @ C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\renderer\api\remote.js:277
emitMany @ events.js:147
emit @ events.js:224
module.js:543 Uncaught Error: Cannot find module '../src/pane-element.js'
at Module._resolveFilename (module.js:543:15)
at Module._resolveFilename (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\common\reset-search-paths.js:35:12)
at Function.Module._resolveFilename (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\src\module-cache.js:350:52)
at Function.Module._load (module.js:473:25)
at Module.require (module.js:586:17)
at require (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\src\native-compile-cache.js:47:27)
at customRequire (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\static<embedded>:96:26)
at get_PaneElement (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\pane.js:8:45)
at Pane.getElement (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\pane.js:95:33)
at ViewRegistry.createView (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\view-registry.js:138:30)
at ViewRegistry.getView (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app\src\view-registry.js:127:25)
at BackgroundTipsElement.attach (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:48:33)
at BackgroundTipsElement.start (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:81:10)
at BackgroundTipsElement.updateVisibility (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:65:12)
at visibilityCallback (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\app.asar\node_modules\background-tips\lib\background-tips-view.js:24:43)
at CallbacksRegistry.apply (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\common\api\callbacks-registry.js:47:25)
at EventEmitter.ipcRenderer.on (C:\Users\pmj64\AppData\Local\atom\app-1.29.0\resources\electron.asar\renderer\api\remote.js:277:21)
at emitMany (events.js:147:13)
at EventEmitter.emit (events.js:224:7)

ans so on.

Also I'm not able to locally locate the files mentioned in the errors.

@smashwilson smashwilson added the papercut Small-scope issues and bugs we can use to backfill our sprint plans label Nov 16, 2018
@annthurium
Copy link
Contributor Author

I believe this has been fixed but if not please feel free to reopen 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code-cleanup 🔧 good first issue papercut Small-scope issues and bugs we can use to backfill our sprint plans
Projects
No open projects
Development

No branches or pull requests

4 participants