Unhandled Rejection (TypeError): Cannot read property 'evalScript' of undefined
Environment
Run these commands in the project folder and fill in their results:
npm ls create-cep-extension-scripts (if you haven’t ejected): -- create-cep-extension-scripts@1.0.0-beta.31
node -v: v12.18.4
npm -v: 7.5.3
Then, specify:
Operating system: Windows 10
Browser and version: Google Chrome Version 88.0.4324.150
Reproducible Demo
import React, { Component } from 'react';
import { evalExtendscript } from 'cep-interface';
import logo from './logo.svg';
import './App.css';
class App extends Component {
test = () => {
evalExtendscript('$.writeln("Hello Foo");');
}
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
</div>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</p>
<button onClick={this.test}>TEST</button>
</div>
);
}
}
export default App;
I got my error : I was trying to use it from react dev server, but I had to use it from PS debug server. It still can't access cep variable for example to read files
Description
I can't use extend script inside of App.js
Expected behavior
Write hello world in console
Actual behavior
Unhandled Rejection (TypeError): Cannot read property 'evalScript' of undefined
Environment
Run these commands in the project folder and fill in their results:
npm ls create-cep-extension-scripts
(if you haven’t ejected): -- create-cep-extension-scripts@1.0.0-beta.31node -v
: v12.18.4npm -v
: 7.5.3Then, specify:
Reproducible Demo
I got my error : I was trying to use it from react dev server, but I had to use it from PS debug server. It still can't access cep variable for example to read files