You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
Please note: This issue occurs because the index.js file in the package does not get Bablified, but it should.
How can we reproduce this behavior?
Create an empty, standalone environment in a new directory.
Run yarn init and go through all the steps.
Run yarn add yoastseo.
Create a new file in the directory named index.js and paste the following code in the file:
// Altered the import to this to ensure compatibility with Node.
const { Paper, Researcher } = require( "yoastseo" );
const paper = new Paper( "Text to analyze", {
keyword: "analyze",
} );
const researcher = new Researcher( paper );
console.log( researcher.getResearch( "wordCountInText" ) );
Run node index.js.
See error appear.
Technical info
Platform: Standalone
Platform version:
Yoast SEO version: 1.64.0
Which browser is affected (or browsers):
Chrome
Firefox
Safari
Other
If relevant, which editor is affected (or editors):
Classic Editor
Gutenberg
Classic Editor plugin
The text was updated successfully, but these errors were encountered:
What did you expect to happen?
While attempting to implement the Yoast SEO package in a Node.js environment, I expected to be able to run it without errors.
What happened instead?
While attempting to run my own script (i.e.
node index.js
), I was presented with the following error:Please note: This issue occurs because the
index.js
file in the package does not get Bablified, but it should.How can we reproduce this behavior?
yarn init
and go through all the steps.yarn add yoastseo
.index.js
and paste the following code in the file:node index.js
.Technical info
Which browser is affected (or browsers):
If relevant, which editor is affected (or editors):
The text was updated successfully, but these errors were encountered: