TylorS / cycle-snabbdom

Alternative DOM driver utilizing the snabbdom library
MIT License
41 stars 5 forks source link

Cannot find module 'snabbdom-to-html' when installing from NPM #17

Closed kaosat-dev closed 8 years ago

kaosat-dev commented 8 years ago

Hello ! I am getting the following error when trying to install cycle-snabbdom from NPM : Cannot find module 'snabbdom-to-html' from '/xxxx/cycle-snabbdom/lib I am guessing this is the same as #15 reported a while back, but was perhaps not published to npm ? (version numbers match though, so its odd)

TylorS commented 8 years ago

@acstll This might be of interest to you as well. Seems to be related to updating to snabbdom-to-html 2.1.0

TylorS commented 8 years ago

@kaosat-dev Could you run npm ls and tell me what version of snabbdom-to-html is installed?

kaosat-dev commented 8 years ago

yes : snabbdom-to-html@2.1.0

TylorS commented 8 years ago

Could you try explicitly installing snabbdom-to-html@2.0.1 and reporting back if the error still exists?

kaosat-dev commented 8 years ago

Tried it, error still stays the same

kaosat-dev commented 8 years ago

edit: never mind my bad, even with older snabbdom-to-html versions it still fails

TylorS commented 8 years ago

It's exactly the same error?

Do you mind posting it?

kaosat-dev commented 8 years ago

exactly the same : Full error message is :

Error: Cannot find module 'snabbdom-to-html' from '/home/xxx/dev/projects/GreenBotics/automaton/node_modules/cycle-snabbdom/lib'

kaosat-dev commented 8 years ago

Btw , if you cannot reproduce on your end, perhaps I can try a barebone version to see if it might be my browserify setup ?

TylorS commented 8 years ago

I can only reproduce with snabbdom-to-html 2.1.0

acstll commented 8 years ago

@TylorS hey, I will take a look tomorrow morning and make sure 2.1.0 is correctly published and working (I'm away now).

Seems like a problem indeed with my package, I tried it in requirebin.com and got that same error.

Sorry about this!

TylorS commented 8 years ago
~/code/tylors/cycle-snabbdom master*
❯ npm ls | grep snabbdom-to-html
├─┬ snabbdom-to-html@2.1.0

~/code/tylors/cycle-snabbdom master*
❯ npm run dist

> cycle-snabbdom@1.0.3 predist /home/tylor/code/tylors/cycle-snabbdom
> rm -rf dist/ && mkdir dist/

> cycle-snabbdom@1.0.3 dist /home/tylor/code/tylors/cycle-snabbdom
> browserify -t [babelify --global] -t browserify-shim --exclude rx --standalone CycleSnabbdom src/index.js -o dist/cycle-snabbdom.js

Error: Cannot find module 'snabbdom-to-html' from '/home/tylor/code/tylors/cycle-snabbdom/src'
    at /home/tylor/code/tylors/cycle-snabbdom/node_modules/resolve/lib/async.js:46:17
    at process (/home/tylor/code/tylors/cycle-snabbdom/node_modules/resolve/lib/async.js:173:43)
    at ondir (/home/tylor/code/tylors/cycle-snabbdom/node_modules/resolve/lib/async.js:188:17)
    at load (/home/tylor/code/tylors/cycle-snabbdom/node_modules/resolve/lib/async.js:69:43)
    at onex (/home/tylor/code/tylors/cycle-snabbdom/node_modules/resolve/lib/async.js:92:31)
    at /home/tylor/code/tylors/cycle-snabbdom/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)
~/code/tylors/cycle-snabbdom master* 9s
❯ npm ls | grep snabbdom-to-html
├─┬ snabbdom-to-html@2.0.1

~/code/tylors/cycle-snabbdom master*
❯ npm run dist

> cycle-snabbdom@1.0.3 predist /home/tylor/code/tylors/cycle-snabbdom
> rm -rf dist/ && mkdir dist/

> cycle-snabbdom@1.0.3 dist /home/tylor/code/tylors/cycle-snabbdom
> browserify -t [babelify --global] -t browserify-shim --exclude rx --standalone CycleSnabbdom src/index.js -o dist/cycle-snabbdom.js

> cycle-snabbdom@1.0.3 postdist /home/tylor/code/tylors/cycle-snabbdom
> uglifyjs dist/cycle-snabbdom.js -o dist/cycle-snabbdom.min.js
TylorS commented 8 years ago

Thank you @acstll. Let me know if there is anything I can do to help?

acstll commented 8 years ago

2.1.0 is indeed broken, the lib folder is missing from the package.

I will publish 2.1.1 and depracate ASAP.

TylorS commented 8 years ago

:+1:

TylorS commented 8 years ago

Thank you @acstll

acstll commented 8 years ago

The main export (toHMTL) should work in 2.1.2. But init and the modules won't. I need to figure out how to set up the browser key in package.json. I could use some help here :-)

I will release 2.2.0 when it's fully working and deprecate all 2.1.x in npm.

TylorS commented 8 years ago

@acstll I'll do some reading :+1:

kaosat-dev commented 8 years ago

thanks a lot for the infos @TylorS and @acstll ! Let me know if I can also help with something!

the-simian commented 8 years ago

Ah, looks like I was slow to move. this is the same issue I was experiencing as well, but it was being manifest as a build error.

I wanted to just add that the unit tests in here were passing for me, but the stuff testem kicked off were failing. This was after cloning the repo, while trying to troubleshoot (after experiencing the issue after pulling from npm)

TylorS commented 8 years ago

This should be fixed with v1.1.0 Please let me know if there are anymore issues.

acstll commented 8 years ago

I just created an issue to keep track of the bug. I will let you kwow when I figure it out. Thank y'all.

kaosat-dev commented 8 years ago

@TylorS it seems to work ok now, thanks ! Should this get closed or remain open for @acstll updates ?

TylorS commented 8 years ago

I'll close for now. If for any reason anyone needs to reopen or continue discussing, feel free.