Coder Social home page Coder Social logo

bit-lit's People

Contributors

benjgil avatar giladshoham avatar itaymendel avatar joshk2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

erikrahm

bit-lit's Issues

Cannot see the component in lit local workspace

Describe the bug

When I create my lit component with a different name from the example in the bit.dev, I can't see the preview of the component in lit when I run the command bit start and when I go to the dev tools it shows me this error:

Failed to load resource: net::ERR_TOO_MANY_REDIRECTS

Steps to Reproduce

Run the commands:
1.bit new lit bit-poc --ascpect teambit.web-components/lit
1.cd bit-poc
1.bit create lit card
1.bit install
1.bit start

Then wait until it opens up in the browser.
After that go to the dev tools and you will see this error:
Failed to load resource: net::ERR_TOO_MANY_REDIRECTS

Expected Behavior

To see a preview of my component in the local workspace that it generates

Screenshots, exceptions and logs

image

If applicable, add screenshots, exceptions, and logs to help explain your problem.

Specifications

  • Bit version:0..595
  • Workspace type: (harmony/legacy)harmony
  • Node version:16.13.1
  • npm / yarn version:8.1.2
  • Platform: Windows 10

for harmony workspace

for leagacy

  • Bit compiler (include version):
  • Bit tester (include version):

Additional context

Add any other context about the problem here.

Unable to build

Hi
I'm creating my own aspects for bit and tried to follow this example, but it throws following error after bit install and bit status

✖ error: unable to load the extension "teambit.web-components/[email protected]", please use the '--log' flag for the full error.

bit test failed

Upgraded bit version to 0.0.493 and updated the Lit environment version to 0.0.8, getting an error

PS C:\Bit\purchase-cart> bit test
√ teambit.component/isolator, create capsules network (completed in 241ms)
testing total of 2 components in workspace 'purchase-cart'
testing 1 components with environment teambit.web-components/[email protected]
FAIL purchase-mfe/basket-summary/src/basket-summary-component.test.ts
● Test suite failed to run
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/en/ecmascript-modules for how to enable it.
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/en/configuration.html
Details:
C:\Bit\purchase-cart\node_modules.pnpm@open-wc\[email protected]\node_modules@open-wc\testing-helpers\index.js:1
({"Object.":function(module,exports,require,_dirname,_filename,global,jest){export { elementUpdated } from './src/elementUpdated.js';
^^^^^^
SyntaxError: Unexpected token 'export'
> 1 | import {fixture, fixtureCleanup} from '@open-wc/testing-helpers';
| ^
2 | import {html} from 'lit-element';
3 | import {BasketSummaryComponent} from './components/basket-summary/basket-summary-component';
4 | import sinon, {SinonSandbox} from 'sinon';
at Runtime.createScriptFromCode (../../Users/Senthilkumar_J/AppData/Local/.bvm/versions/0.0.493/bit-0.0.493/node_modules/jest-runtime/build/index.js:1350:14)
at Object. (purchase-mfe/basket-summary/src/basket-summary-component.test.ts:1:1)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 9.711 s
Ran all test suites.
tested 2 components in 16.655 seconds.

Compositions doesn't work with functions, only with string templates

Hi

It seems that whenever I want to create a composition using this environment, I can't write them as functions that takes arguments and properties like the Storybook Format the docs says it is compatible with.

On these two compositions, only the second is visible :

import './l-label';

export const HtmlStringComposition = ({toto}) => `<l-label name="World">${toto}</l-label>`;
HtmlStringComposition.args = {
    toto: 'test'
};

export const SecondComposition = `<l-label>test</l-label>`

Plus, there is no error indicating what is going on. There is just no results visible.

Is this normal ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.