Open jsun-tech opened 8 years ago
We use requirejs
with cherrytree-for-knockout
, as well as bower, so we have a requirejs.config.js
file that looks like this:
require.config({
baseUrl: '/',
paths: {
cherrytree: 'bower_components/cherrytree/build/standalone',
'cherrytree-for-knockout': 'bower_components/cherrytree-for-knockout/cherrytree-for-knockout',
knockout: 'bower_components/knockout/dist/knockout.debug',
}
})
so it's odd you are calling requirejs
instead of require
there (typo)? but cherrytree-for-knockout
uses a UMD wrapper so you can easily use it as a regular script, or with require.js, webpack, browserify, and the like.
Hello Nathan,
I was trying to use cherrytree using require but I am having some problems. I was wondering if you could help me out.
the versions I am running are:
this is my main class
the problem that is on the console says: Uncaught (in promise) TypeError: Cannot read property 'name' of undefined(…) in this line: middlewareName = router.middleware[i].name || 'anonymous'; of cherrytree.js
It seems that I am not able to load the middleware.
Thanks a lot Nathan.