Cant setup Editor
Cant setup Editor

import 'datatables.net';
import Editor from 'datatables.net-editor';
let dataTableEditor = new Editor(editorOptions);
i get
Message: Cannot set property '$' of undefined
at DataTable (jquery.dataTables.js:132)
at new ./node_modules/datatables.net-editor/js/dataTables.editor.js.module.exports (dataTables.editor.js:21)
i jave installed the editor "Editor-NodeJS-1.9.0"
This discussion has been closed.
Answers
The message suggests that jQuery is not being referenced. DataTables is dependent on jQuery.
i was able to setup/use just Datatables just fine, its when i try to add in the editor (trial version) i get the error
import 'datatables.net';
$table.DataTable(dataTableOptions);
Works
But
import 'datatables.net';
import Editor from 'datatables.net-editor';
let dataTableEditor = new Editor(editorOptions);
$table.DataTable(dataTableOptions);
Doesnt Work
and my understanding of the error message is that the object that suppose to have the '$' field is null/undefined. in this case its 'this' under Datatable that seems to be undefined when Editor calls it
Are you able to give me a link to your repo so I can attempt to reproduce this error please? If that isn't possible, can you give me the steps and code you used?
Thanks,
Allan
using node i installed the jquery, datatables.net-dt, datatables.net-editor, and datatables.net-editor-dt packages. Followed the instructions in the readme in the datatables.net-editor package to install the trial (node node_modules/datatables.net-editor/install.js pathToEditorZip).
then my .js is:
jquery is being added with webpack
Can you show me your package.json file and the full Webpack config so I can attempt to recreate the issue here please?
Thanks,
Allan