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.

How to use primeng as an external dependency

See original GitHub issue

Type of Issue

Problem exporting other components of primeng

  • [ X] Bug Report
  • Feature Request

Description

I’ve been trying to creante a package with the packager. My app uses primeng but it says that the components of the library are not exported. The problem is with rollup:

‘InputSwitchModule’ is not exported by node_modules\primeng\primeng.js Error: ‘InputSwitchModule’ is not exported by node_modules\primeng\primeng.js at error (C:\Users\Hely\WebstormProjects\SysmarComponents\node_modules\rollup\dist\rollup.js:185:14) at Module.error (C:\Users\Hely\WebstormProjects\SysmarComponents\node_modules\rollup\dist\rollup.js:8390:3) at Module.trace (C:\Users\Hely\WebstormProjects\SysmarComponents\node_modules\rollup\dist\rollup.js:8487:10) at ModuleScope.findVariable (C:\Users\Hely\WebstormProjects\SysmarComponents\node_modules\rollup\dist\rollup.js:8093:22) at Node.bind (C:\Users\Hely\WebstormProjects\SysmarComponents\node_modules\rollup\dist\rollup.js:6996:31) at eachChild.child (C:\Users\Hely\WebstormProjects\SysmarComponents\node_modules\rollup\dist\rollup.js:5819:34) at value.forEach.child (C:\Users\Hely\WebstormProjects\SysmarComponents\node_modules\rollup\dist\rollup.js:5845:38) at Array.forEach (native) at keys.forEach.key (C:\Users\Hely\WebstormProjects\SysmarComponents\node_modules\rollup\dist\rollup.js:5845:11) at Array.forEach (native)

please describe the error that you encountered

How To Reproduce

Just use any component of primeng and then try to run ‘npm packager’

Expected Behaviour

Every package exported or at least a file where you can add the exported files

Version Information

ng-packagr: v1.2.0
node: v8.2.1
@angular: v4.4.4node
rxjs: 5.4.3
zone.js: 0.8.18
primeng: 2.0.6

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

18reactions
DavidParks8commented, Oct 17, 2017

You should be able to build with primeng by utilizing the following addition to your ng-package config:

  {
    "lib": {
      "externals": {
        "primeng/primeng": "primeng"
      }
    }
  }
0reactions
github-actions[bot]commented, Jun 19, 2020

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

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot omit PrimeNG dependencies using ... - Stack Overflow
Try narrowing the scope of the regex: /^primeng.*$/. It worked for me.
Read more >
Getting Started with PrimeNG - PrimeFaces
PrimeNG is available at npm, if you have an existing application run the following command to download it to your project. npm install...
Read more >
Adding PrimeNG dependencies | Angular UI Development ...
Every project using PrimeNG needs the locally installed library. You can achieve this by running the following command:
Read more >
Cheat Sheet - Angular
Bootstraps the application, using the root component from the specified ... List of dependency injection providers visible both to the contents of this ......
Read more >
Components, services, and dependency injection - O'Reilly
styleUrls : An array of paths to external files with ... Get Angular UI Development with PrimeNG now with the O'Reilly learning platform....
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