codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.04k stars 2.27k forks source link

Angular 13 with Angular InstantSearch throw an error #6533

Open FabienMotte opened 2 years ago

FabienMotte commented 2 years ago

🐛 Bug Report

Preflight Checklist

Description of the problem

In local, running this example using Angular 13 and Angular InstantSearch 4.1.0 works fine. But on Codesandbox, an error is thrown: Type NgAisRootModule does not have 'ɵmod' property..

image

In local, running yarn start for the first time converts the Angular InstantSearch library from the View Engine to Ivy:

Processing legacy "View Engine" libraries:
- angular-instantsearch [es2015/esm2015] (https://github.com/algolia/angular-instantsearch.git)
Encourage the library authors to publish an Ivy distribution.
✔ Browser application bundle generation complete.

But I don't know what's happening on CodeSandbox side.

Link to sandbox for reproduction

Thank you!

How has this issue affected you? What are you trying to accomplish?

Examples in our documentation using Angular 13 with Angular InstantSearch no longer work.

Your Environment

Software Name/Version
Codesandbox 57b91069f
Browser Chrome 99.0.4844.51
Operating System macOS 11.6.4
JamesACS commented 2 years ago

Hey @FabienMotte ,

Unfortunately that link goes to an empty Sandbox, do you have a link to the live Sandbox?

FabienMotte commented 2 years ago

Hi @JamesACS, thanks for your message!

The Sandbox should work as the folder exists in our GitHub repo: https://github.com/algolia/doc-code-samples/tree/master/Angular%20InstantSearch/getting-started

It seems related to this issue: https://github.com/codesandbox/codesandbox-client/issues/6443 I can open a new issue if you want as this issue is not related to this one.

In the meantime, you should be able to reproduce the error I mentioned in my previous message using this working Sandbox: https://codesandbox.io/s/github/algolia/doc-code-samples/tree/master/Angular+InstantSearch/e-commerce/

Thanks!

JamesACS commented 2 years ago

Thanks @FabienMotte - We've ID'd this as an issue with our bundler for Angular. I've raised it with the team!

FabienMotte commented 2 years ago

Thank you @JamesACS!

aymeric-giraudet commented 1 year ago

Hi ! I wanted to open an issue for these two but I guess it's better here :

All different error messages but seems like it might be the same bundler issue ?

They both work fine locally and on StackBlitz.