QubitProducts / cherrytree

A flexible nested router.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't run hello-world example

nathanboktae opened this issue · comments

First it's missing jquery as a dependency, but after adding that, I'm still getting:

~/github/cherrytree/examples/hello-world 826b1df|master  ✹✭
 6:14PM ᐅ npm start

> hello-world@1.0.0 start /Users/nblack/github/cherrytree/examples/hello-world
> webpack-dev-server --colors --no-info --port=8000 --content-base .

http://localhost:8000/webpack-dev-server/
webpack result is served from /
content is served from /Users/nblack/github/cherrytree/examples/hello-world
Hash: 9590aaacd90b7edeaa10
Version: webpack 1.10.5
Time: 1033ms
        Asset    Size  Chunks             Chunk Names
    bundle.js  272 kB       0  [emitted]  main
bundle.js.map  343 kB       0  [emitted]  main
chunk    {0} bundle.js, bundle.js.map (main) 260 kB [rendered]
    [0] ./index.js 4.36 kB {0} [built]
    [1] ./~/jquery/dist/jquery.js 248 kB {0} [built]
    [2] /Users/nblack/github/cherrytree/index.js 56 bytes {0} [built] [1 error]
    [3] ./style.css 1.17 kB {0} [built]
    [4] ./~/css-loader!./style.css 999 bytes {0} [built]
    [5] ./~/css-loader/cssToString.js 352 bytes {0} [built]
    [6] ./~/style-loader/addStyles.js 5.51 kB {0} [built]

ERROR in /Users/nblack/github/cherrytree/index.js
Module not found: Error: Cannot resolve module 'babel' in /Users/nblack/github/cherrytree
 @ /Users/nblack/github/cherrytree/index.js 3:17-40

does it also need loader: 'babel?optional=runtime' like the main project? Sorry I have no experience with webpack.

Hi, thanks for reporting this!

The issue is that for these examples to run you would have to first run npm install in the root of the cloned repo. But that wasn't very intuitive or documented + package.json doesn't contain the dependencies used by the examples, making the examples not fully self contained.

So I've fixed all that up in #80. Examples should work standalone now. I did use one of the newer npm features - a local install (

"cherrytree": "file:../..",
), so make sure you're using one of the later npm versions.

Let me know if it's still not working or if you have any other issues/questions.

Yup It's working for me now. Thanks!