c8r / kit

Tools for developing, documenting, and testing React component libraries

Home Page:https://compositor.io/kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error with webpack-hot-client

jeetiss opened this issue · comments

Hi ^_^

when kit-cli installed globally, command kit example runs with error

ERROR in multi webpack-hot-client/client?8e5c088f-87d7-482f-8ad1-48719db0177c /Users/jeetiss/n/lib/node_modules/@compositor/kit-cli/node_modules/@compositor/x0/lib/entry
Module not found: Error: Can't resolve 'webpack-hot-client/client?8e5c088f-87d7-482f-8ad1-48719db0177c' in '/Users/jeetiss/Projects/systemo/stories'
 @ multi webpack-hot-client/client?8e5c088f-87d7-482f-8ad1-48719db0177c /Users/jeetiss/n/lib/node_modules/@compositor/kit-cli/node_modules/@compositor/x0/lib/entry

and if install kit-cli in local ./node_modules works fine

i can find issue with webpack-hot-client, and this should fix problem
webpack-contrib/webpack-hot-client#8

I am getting the same error …

Thanks for the report! Do you mind providing your kit, npm, and node versions please?

Have you also tried running the cli via your package.json? I'm wondering if this error is specific to global installs.

@johno indeed this only occurs with global installs. It works when it is a local dependency and that is how I am using it now. These are the versions I am using node 9.11.1, npm 6.1.0 and kit 1.0.37.

Anyway thanks for kit. I love the simplicity of it.

I'm having the same problem...

I am trying this for the first time and got the same issue here with global installation...
I'm using node 8.9.1 npm 5.5.1 kit 1.0.37
Installing it as a devDependency works ok
Maybe updating the readme section Getting Started is a good idea

kudos for the amazing project

Thanks for reporting this! I can confirm that I have seen the same issue on one computer, but not the other. In #179 I'm attempting to change the webpack resolve as mentioned in webpack-contrib/webpack-hot-client#62, and have published a prerelease. If anyone can help by trying to install the following to confirm that it works as a global install, that'd be super helpful

npm i -g @compositor/kit-cli@alpha

I have some errors with resolving babel-runtime

ERROR in ../components/Button.js
Module not found: Error: Can't resolve 'babel-runtime/helpers/taggedTemplateLiteral' in '/Users/jeetiss/Projects/systemo/components'
 @ ../components/Button.js 7:30-84
 @ ./Button.js
 @ . sync nonrecursive \.(js|mdx|jsx)$
 @ /Users/jeetiss/n/lib/node_modules/@compositor/kit-cli/node_modules/@compositor/x0/lib/entry.js
 @ multi /Users/jeetiss/n/lib/node_modules/@compositor/kit-cli/node_modules/@compositor/x0/lib/entry

I fix this in #180

We just published another release that should hopefully solve the webpack-hot-client error once and for all.

I believe the issue is similar to the babel-runtime resolution as well. The underlying issue appears to be a result of @compositor/x0 sometimes being nested within @compositor/kit-cli/node_modules and sometimes not.

Haven't a clue why this is occurring, but was able to fix it for webpack-hot-client via c8r/x0#67 since it added an alias that relied on a flat installation (which isn't always the case).

Going to close this as it seems to be fixed. If anyone encounters this error with the latest version of kit-cli please open up a new issue.