-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Problem with npm install and jquery-ui #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks!
|
@Kinnza nice, I was having the same issue. |
@Kinnza i've added your snippet to node_modules/react-gridstack/webpack.config.js but it does not fix the same issue i have. is this the wrong place? (edit: i fixed the issue by changing the paths inside gridstack.js to e.g. '../../jquery-ui/ui/data.js' but your solution would be cleaner) |
It's not in react-gridstack's webpack.config.js you need to add this config but in your own webpack.config.js file. Example, we're taking gridstacks AND jquery-ui from node_modules. So in our webpack.config.js file we have :
Then "import "gridstack/dist/gridstack";" (from node_module) should find jquery-ui. Note: we're using webpack v.2 and you should never edit node_modules files ;) |
Beginning in 1.12 jQuery UI has a new subfolder for widgets. See: gridstack/gridstack.js#524
i don't manage webpack in my project but i got this error |
@vgupta91 what version of gridstack are you using ? in 1.x we bundle jquery-ui as part of |
"react-gridstack": "^0.1.4", |
"gridstack": "^1.1.0" |
@vgupta91 this is a separate issue -
so you might be able to use an older gridstack version like 0.5.5, but you will have to ping them about updating to a later/latest. Right now it list 0.2.5 |
I am getting this error. Can't resolve 'jquery-ui/data And i am using react i tried adding webpack.js. Still i am getting same error. |
@Bennajachin-Hexaware are you using the no longer maintained |
Im using the latest version 2.6, with the required jquery-ui (1.12)
if i use require/import for gridstack i get errors loading jquery-ui components. for example:
Module not found: Error: Cannot resolve module 'jquery-ui/version' in /develop/gigaspaces/cloudify-ui-new/node_modules/gridstack/dist
I see in jquery-ui documentation that in 1.12 they moved the files to a nested ui directory, so the require should be like so: jquery-ui/ui/version.
I also see in gridstack code the loading of the wrong modules:
define(['jquery', 'lodash', 'jquery-ui/data', 'jquery-ui/disable-selection', 'jquery-ui/focusable',
'jquery-ui/form', 'jquery-ui/ie', 'jquery-ui/keycode', 'jquery-ui/labels', 'jquery-ui/jquery-1-7',
'jquery-ui/plugin', 'jquery-ui/safe-active-element', 'jquery-ui/safe-blur', 'jquery-ui/scroll-parent',
'jquery-ui/tabbable', 'jquery-ui/unique-id', 'jquery-ui/version', 'jquery-ui/widget',
'jquery-ui/widgets/mouse', 'jquery-ui/widgets/draggable', 'jquery-ui/widgets/droppable',
'jquery-ui/widgets/resizable'], factory);
The text was updated successfully, but these errors were encountered: