adobe-extension-tools / cep-starter

A starter project for developing CEP extensions using the cep-bundler and cep-packager
http://www.mtmograph.com
19 stars 2 forks source link

chrome console error #1

Open sumhah opened 6 years ago

sumhah commented 6 years ago

Uncaught TypeError: window.__adobe_cep.addEventListener is not a function at CSInterface.addEventListener (eval at (eval at compileModule (index.js:56)), :137:30) at Object.livereactload_module (eval at (eval at compileModule (index.js:56)), :19:24) at load (index.js:102) at loader (index.js:282) at index.js:358

and npm start get:

[06:30:22.805] LiveReactload :: Reload server up and listening in port 4474... -> watchPublic -> watchAssets [0004] info Server running at http://0.0.0.0:5000/ (connect) src/jsx/console.ts(1,11): error TS2304: Cannot find name 'ExternalObject'. src/jsx/console.ts(3,14): error TS2304: Cannot find name 'ExternalObject'. src/jsx/console.ts(13,22): error TS2304: Cannot find name 'CSXSEvent'. 14:30:24 - Compilation complete. Watching for file changes.

photoshop cc 2018

What may be the problem? Very grateful!

vespakoen commented 6 years ago

The typescript warnings in the terminal are a known problem, you can ignore those (I made a pull request for those on the types-for-adobe library)

Not sure why adobe_cep is not available for you, I will try it out over here on PS and get back to you

vespakoen commented 6 years ago

I just tried it out on Photoshop CC2018 (macOS) over here, it works fine for me, until the extension get's too small, then it disconnects from the debugger. Restarting the extension doesn't help, I had to restart Photoshop completely, maybe that helps?

Here is the pull request by the way: https://github.com/pravdomil/Types-for-Adobe/pull/30

sumhah commented 6 years ago

still can't solve this problem.

all log:

ReferenceError: require is not defined at (index):24

<script>
    try {
      if (window.cep_node) {
        window.nodeRequire = function (path) {
          if (path.substr(0, 1) === '.') {
            return cep_node.require(__dirname + path.substr(1))
          } else {
            return cep_node.require(path)
          }
        }
      } else {
// The code is running here  and require is undefined
        window.nodeRequire = require
      }
    } catch (err) {
      console.log(err)
    }
    </script>

react-dom.development.js?version=7veCVg:17210 Download the React DevTools for a better development experience: https://fb.me/react-devtools

browserShim.js?version=7T0qHg:7 SHIM: getHostEnvironment called

csInterface.js?version=R3q29g:136 Uncaught TypeError: window.adobe_cep.addEventListener is not a function at CSInterface.addEventListener (eval at (eval at compileModule (index.js:56)), :137:30) at Object.livereactload_module (eval at (eval at compileModule (index.js:56)), :19:24) at load (index.js:102) at loader (index.js:282) at index.js:358 CSInterface.addEventListener @ csInterface.js?version=R3q29g:136 livereactload_module @ index.js?version=g0TM+Q:17 load @ index.js:102 loader @ index.js:282 (anonymous) @ index.js:358

index.js:348 LiveReactload :: WebSocket client listening for changes...

sumhah commented 6 years ago

Really exciting! The problem has been solved.

But I was open localhost:4000 in the cefclient , there is no blue link can click in the chrome.