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.

ng add fails to work with Angular 11.1.x

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

After running ng add command it throws an exception and doesn’t do the work successfully.

Expected behavior

It would finish the process.

Minimal reproduction of the problem with instructions

After updating angular-cli to latest create a new project with ng new command and then run the ng add @ngneat/tailwind command in the folder. It would crash with below message:


An unhandled exception occurred: Cannot find module '@schematics/angular/utility/config'
Require stack:
- /Users/xxxxxxxx/node_modules/@ngneat/tailwind/src/utils/normalize-options-ng.js
- /Users/xxxxxxxx/node_modules/@ngneat/tailwind/src/schematics/ng-add/ng-add.js
- /Users/xxxxxxxx/node_modules/@angular-devkit/schematics/tools/export-ref.js
- /Users/xxxxxxxx/node_modules/@angular-devkit/schematics/tools/index.js
- /Users/xxxxxxxx/node_modules/@angular/cli/utilities/json-schema.js
- /Users/xxxxxxxx/node_modules/@angular/cli/models/command-runner.js
- /Users/xxxxxxxx/node_modules/@angular/cli/lib/cli/index.js
- /usr/local/lib/node_modules/@angular/cli/lib/init.js
- /usr/local/lib/node_modules/@angular/cli/bin/ng
See "/private/tmp/ng-jz5Ggc/angular-errors.log" for further details.

What is the motivation / use case for changing the behavior?

I think this is a compatibility issue with newer version of angular.

Environment


Angular version: 11.1.x

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [x] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 15.3.0
- Platform:  Mac

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
vltanskycommented, Jan 23, 2021

I agree, but I think we should at least mention this in readme.

2reactions
vltanskycommented, Jan 23, 2021

There is also a difference in dependencies that we need to install for different angular versions: > v11.1 - only tailwindcss and selected plugins < v11.1 - postcss 8 < v11 - postcss 8, postcss-import, postcss-loader, autoprefixer

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng new fails with latest version of @angular/cli and npm #20719
When using the latest version of @angular/cli and npm the command ng new fails during dependencies installation. (but it's working fine with ...
Read more >
Could not resolve dependency: npm ERR! peer @angular ...
I got the issue when installing Angular Material. Fixed it by removing the @latest from the command. Changed
Read more >
Angular 10 to 11 update guide
Run ng update @angular/core@11 @angular/cli@11 which should bring you to version 11 of ... You can now opt-in to use webpack 5 by...
Read more >
NG Bootstrap - npm
If you have an Angular CLI project, you could simply use our schematics to add ng-bootstrap library to it. Just run the following:...
Read more >
How To Solve The Schematic Workflow Failed Error In Angular
This means that your system didn't install npm because a few libraries are missing in your system due to low network or any...
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