Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Uncaught TypeError: clipboard.readImage is not a function #306

Closed
lbliii opened this issue May 28, 2021 · 1 comment
Closed

Uncaught TypeError: clipboard.readImage is not a function #306

lbliii opened this issue May 28, 2021 · 1 comment
Labels

Comments

@lbliii
Copy link

lbliii commented May 28, 2021

[Enter steps to reproduce:]

  1. copy an image
  2. use the shift + cmd + i on a markdown file.

Atom: 1.57.0 x64
Electron: 9.4.4
OS: Mac OS X 10.15.7
Thrown From: markdown-writer package 2.11.11

Stack Trace

Uncaught TypeError: clipboard.readImage is not a function

At /Users/lblane/.atom/packages/markdown-writer/lib/commands/insert-image.coffee:9

TypeError: clipboard.readImage is not a function
    at InsertImage.module.exports.InsertImage.trigger (/packages/markdown-writer/lib/commands/insert-image.coffee:15:21)
    at /packages/markdown-writer/lib/markdown-writer.coffee:157:37)
    at CommandRegistry.handleCommandEvent (<embedded>:11:352215)
    at KeymapManager.dispatchCommandEvent (<embedded>:11:1226991)
    at KeymapManager.handleKeyboardEvent (<embedded>:11:1223125)
    at WindowEventHandler.handleDocumentKeyEvent (<embedded>:11:286551)

Commands

     -0:04.3.0 markdown-writer:insert-image (input.hidden-input)

Non-Core Packages

atom-css-class-checker 0.4.3 
atom-material-ui 2.1.3 
hugofy 2.0.0 
language-babel 2.85.0 
language-hugo 0.5.1 
linter 3.3.1 
linter-openapi 1.0.1 
linter-ui-default 3.3.1 
markdown-writer 2.11.11 
prettier-atom 0.60.1 
pretty-json 2.1.2 
preview-plus 1.2.7 
@zhuochun
Copy link
Owner

zhuochun commented Jun 7, 2021

Might be related to some deprecations in latest Atom version:

  • Use require("electron").remote instead of require("remote")
  • Use require("electron").clipboard instead of require("clipboard")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants