question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot build with modules only

See original GitHub issue

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

I guess

Description

I am trying to build our app for modern browsers only (only type=module) but cannot get it working. Using a fresh ng new does not even work. I have created a browserslist in the root containing only β€œlast 2 chrome versions” and left the target at β€œes2017” (ng g application did that). Even using β€œes2015” does not work.

πŸ”¬ Minimal Reproduction

  1. ng new test --defaults --no-create-application
  2. cd test
  3. ng g application test --defaults
  4. echo β€œlast 1 Chrome version” > .browserslistrc
  5. ng build
  6. cat dist/test/browser/index.html
  7. No es6 modules generated

πŸ”₯ Exception or Error


None

🌍 Your Environment


Angular CLI: 12.2.0
Node: 12.22.2
Package Manager: npm 6.14.13
OS: win32 x64

Angular: 12.2.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.0
@angular-devkit/build-angular   12.2.0
@angular-devkit/core            12.2.0
@angular-devkit/schematics      12.2.0
@schematics/angular             12.2.0
rxjs                            6.6.7
typescript                      4.3.5

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
alan-agius4commented, Aug 5, 2021

In that case, this has been addressed in version 13 which is currently in pre-release stage via the linked PR above.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 2021

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not build module - ios - Stack Overflow
Solved it by following: Go to Build settings -> Apple LLVM 7.0 - Language - Modules -> Enable Modules (C and Objective-C) and...
Read more >
Could not build Objective-C module 'Firebase'
When I compile the application I get an error equal to this: Could not build Objective-C module 'Firebase' ... There is only one...
Read more >
Cannot build PowerShell module with nested folders/files #584
I am containerizing build just right now so I can try different combinations of PowerShellGet and dotnet. I should be able to find...
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >
Cannot build kgdboe against kernel headers
lsmod lists only one single module, no other modules available to load, how do I proceed? 3 Β· Some questions regarding linux kernel...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found