I have a Meteor application (1.4.1) and have just installed the jquery-ui npm package (1.12.1). I also have jquery installed via npm (3.1.0).
I am receiving the following error in the browser console:
Error: Cannot read property 'sortable' of undefined TypeError: Cannot
read property 'sortable' of undefined
This refers to this block in my code:
( function($, undefined ) {
$.widget( "ui.sortable", $.ui.sortable, {
...
});
}(jQuery) );
I have tried with/without importing the jquery-ui package at the top of the page:
import 'jquery-ui';
but still no joy. I have also viewed the source on the page and I cannot see jquery-ui anywhere, however, when I list the npm modules in the terminal, jquery-ui is listed. Any ideas what the issue is?
This is not directly an answer to your question, but certainly a solution: just use the already-wrapped meteor package instead of installing the npm package directly (https://atmospherejs.com/mizzao/jquery-ui):
meteor add mizzao:jquery-ui
Related
hi i installed autoprefixer css via package install . node.js is installed and i think i did everything right but when i try running it this error is showing up:
Autoprefixer
Error: (node:20773) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/"myusername"/Library/Application Support/Sublime Text/Packages/Autoprefixer/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use node --trace-deprecation ... to show where the warning was created)
can someone help me with it ?
thx
This is an issue with one of Autoprefixer's JavaScript dependencies, named postcss. The Autoprefixer plugin hasn't been updated in over a year, so some of its dependencies have grown a little stale. However, as detailed here, the fix is pretty straightforward.
Open the Terminal app, and type in
cd "~/Library/Application Support/Sublime Text/Packages/Autoprefixer"
(don't forget the quotes around the path, as it contains spaces)
Once in that directory, just run
npm update
and the JS deps should be updated. Restart Sublime, and you should be all set.
I found the same error:
[DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in
the "exports" field module resolution of the package at
.../node_modules/tslib/package.json.
Then I solved it by exploring in the file /node_modules/tslib/package.json and update the package.json file with the following.
"exports": {
...,
"./": "./*"
}
i am building an app that uses react-router,flux and i found this library called redux-auth(https://github.com/lynndylanhurley/redux-auth). I am trying to use it since it has a lot of work done regarding loging,sign up, etc.
I installed the dependencies with npm in this order - >
npm install redux-auth --save
npm install material-ui --save
npm install react-tap-event-plugin
After this i got the error i mention, the module isActive cannot be found.
So i searched the web and found this post:
https://github.com/acdlite/redux-router/issues/111
Where they fix it with this command: npm install --save history react-router#latest followed by npm install --save redux-router#1.0.0-beta3
After this my app broke, and now i get the error : "Error: ajax not supported in this browser" when prerendering Router with / and {}
The line with such error: <%= react_router 'Router', 'HistoryLocation', {}, { prerender: params[:noprerender].nil?, prerender_location: root_path } %>
Tried uninstalling such libraries but didn't work out, tried removing the node_modules dir and rebuilding with npm but didn't work.
Any help or advice? is impossible for me to use this library? is it maybe a compability problem between flux and redux? Any help is welcome.
Edit #1 : I am using Chrome.
I was installing the polymer on my windows 8 pc by taking tutorials from tutplus. I was able to install Polymer/platform and Polymer/polymer using bower.
Now, I wanted to install the core-elements and polymer-ui-elements but every time when I do:
bower install Polymer/core-elements
bower install Polymer/polymer-ui-elements
The command line hangs up for a minute and then gives the error:
FATAL ERROR: JS Allocation failed - process out of memory
How to overcome this error?
This is from Installing Polymer through bower freezes
======================
according to http://github.com/bower/bower/issues/1324 there is a workaround.
edit bower.json by adding in a line so the dependency area looks like this
dependencies": {
"polymer": "Polymer/polymer#~0.3.1",
"core-elements": "Polymer/core-elements"
}
then run $ bower update
you can add other packages, too.
I'm actually brand new to polymer (had trouble installing it, as you can imagine) so I'm not positive this works.
Has anyone successfully used any fileSystem calls in package:chrome/app.dart? (This is the Chrome API package for Google Dart.)
Here's my code:
import 'package:chrome/app.dart';
void main() {
fileSystem.chooseEntry();
}
Here's my pubspec.yaml file:
name: ChooseEntry
description: A sample chrome packaged application
dependencies:
browser: any
chrome: any
meta: any
The other files were generated automatically by the Dart Editor and remain untouched by me.
The error I get from Dartium is:
Breaking on exception: 'package:chrome/src/common.dart': malformed type: line 72 pos 29: type 'js.Callback' is not loaded
When I compile to JS and run in Dartium or Chrome, I get this error:
Uncaught RuntimeError: Error: Cannot resolve 'Callback'.
So, my question is whether anyone has successfully used the chooseEntry API, or any API in fileSystem and, if so, what about what I did needs to be fixed. My guess is that I'm missing a package, but I can't identify what it might be.
I did add package "js" to pubspec.yaml, with no effect. I also tried making copies of all the packages, in case Dartium or Chrome didn't handle the symlinks correctly, and that didn't help either. (I doubt that that's the problem, as it found the code for fileSystem.chooseEntry just fine.)
I'm using:
Dart Editor version 1.0.0_r30798 (STABLE)
Dart SDK version 1.0.0.10_r30798
The chrome package appears not to be maintained anymore, consider using chrome_gen instead by replacing chrome with chrome_gen in pubspec.yaml and by editing the import statement like this:
import 'package:chrome_gen/chrome_app.dart';
main() {
fileSystem.chooseEntry();
}
The difference between these two packages is that wrappers are hand-written in chrome and autogenerated in chrome_gen from the json and idl files from Chrome.
Links:
Pub Package: chrome_gen
Mailing List: What is the difference between chrome and chrome_gen ?
When I try to import a package with the syntax import 'package:markdown/markdown.dart';, I get no error in Dart Editor but when I run the dart application, the debugger shows me the message:
An error occurred loading file: package:markdown/markdown.dart
Failed to load resource
chrome-extension://gfjabgeipkcfopofkhjimepepnomcidk/dart/packages/markdown/markdown.dart
But when I write the whole path (import "../../packages/markdown/markdown.dart";) everything works fine. I cannot understand why the syntax package: doesn't work in my code though it works in Dart Editor's own examples.
You can see the Chrome app architecture below (I'm loading a package from translator.dart):
You should have the package added as a dependency in pubspec.yaml (which I assume you do).
Also try running following:
delete packages folder
delete pubspec.lock
run pub get to fetch the
dependencies again.
I think in your md_to_html folder you need a link to the 'packages' directory for the shortform to work. I seem to remember this happening when the workspace is built but I'm not sure now which command triggers it, have a look at the current pub docs.