Comments (2)
Correction:
Adding the following to the main project's tsconfig.json
seems to allow compilation to succeed, however it throws an exception on app initialization:
"paths": {
"primeng/*": ["../node_modules/primeng/*/public_api"]
},
main.ts:27 ERROR Error: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at https://angular.io/errors/NG0203
at injectInjectorOnly (core.mjs:1093:15)
at Module.ɵɵinject (core.mjs:1106:60)
at Object.RouterModule_Factory [as useFactory] (router.mjs:424:103)
at Object.factory (core.mjs:3322:38)
at core.mjs:3219:47
at runInInjectorProfilerContext (core.mjs:866:9)
at R3Injector.hydrate (core.mjs:3218:21)
at R3Injector.get (core.mjs:3082:33)
at injectInjectorOnly (core.mjs:1100:40)
at ɵɵinject (core.mjs:1106:60)
handleError @ core.mjs:6531
(anonymous) @ core.mjs:31269
invoke @ zone.js:365
run @ zone.js:111
runOutsideAngular @ core.mjs:18451
(anonymous) @ core.mjs:31269
invoke @ zone.js:365
onInvoke @ core.mjs:18555
invoke @ zone.js:364
run @ zone.js:111
(anonymous) @ zone.js:2438
invokeTask @ zone.js:400
(anonymous) @ core.mjs:18229
onInvokeTask @ core.mjs:18229
invokeTask @ zone.js:399
onInvokeTask @ core.mjs:18542
invokeTask @ zone.js:399
runTask @ zone.js:158
drainMicroTaskQueue @ zone.js:579
Zone - Promise.then (async)
onScheduleTask @ core.mjs:18223
scheduleTask @ zone.js:379
onScheduleTask @ zone.js:267
scheduleTask @ zone.js:379
scheduleTask @ zone.js:201
scheduleMicroTask @ zone.js:221
scheduleResolveOrReject @ zone.js:2428
resolvePromise @ zone.js:2362
(anonymous) @ zone.js:2445
invokeTask @ zone.js:400
(anonymous) @ core.mjs:18229
onInvokeTask @ core.mjs:18229
invokeTask @ zone.js:399
onInvokeTask @ core.mjs:18542
invokeTask @ zone.js:399
runTask @ zone.js:158
drainMicroTaskQueue @ zone.js:579
Zone - Promise.then (async)
onScheduleTask @ core.mjs:18223
scheduleTask @ zone.js:379
onScheduleTask @ zone.js:267
scheduleTask @ zone.js:379
scheduleTask @ zone.js:201
scheduleMicroTask @ zone.js:221
scheduleResolveOrReject @ zone.js:2428
then @ zone.js:2633
(anonymous) @ core.mjs:35094
_callAndReportToErrorHandler @ core.mjs:31266
(anonymous) @ core.mjs:35091
invoke @ zone.js:365
onInvoke @ core.mjs:18555
invoke @ zone.js:364
run @ zone.js:111
run @ core.mjs:18406
internalCreateApplication @ core.mjs:35068
bootstrapApplication @ platform-browser.mjs:1027
4429 @ main.ts:27
__webpack_require__ @ bootstrap:19
__webpack_exec__ @ primeng-utils.ts:3
(anonymous) @ primeng-utils.ts:3
__webpack_require__.O @ chunk loaded:23
(anonymous) @ primeng-utils.ts:3
webpackJsonpCallback @ jsonp chunk loading:71
(anonymous) @ main.js:2
Show 57 more frames
Show less
11:02:48.099 main.ts:66 Error: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at https://angular.io/errors/NG0203
at injectInjectorOnly (core.mjs:1093:15)
at Module.ɵɵinject (core.mjs:1106:60)
at Object.RouterModule_Factory [as useFactory] (router.mjs:424:103)
at Object.factory (core.mjs:3322:38)
at core.mjs:3219:47
at runInInjectorProfilerContext (core.mjs:866:9)
at R3Injector.hydrate (core.mjs:3218:21)
at R3Injector.get (core.mjs:3082:33)
at injectInjectorOnly (core.mjs:1100:40)
at ɵɵinject (core.mjs:1106:60)
Note that I am NOT using inject calls outside the allowed places, and the same code works with primeng version 17.16.0 downloaded from the official npm source.
from primeng.
Effin preserveSymlinks: true
solved the issue.
from primeng.
Related Issues (20)
- Accordion: Fix and extend unit test
- Dropdown: Fix unit test
- Table: Numeric Filter HOT 3
- Tooltip: this.container is null on fast mouseover on PrimeNG demo page HOT 8
- MultiSelect Component: deselecting a checkbox item after selectall is not properly binded and previous selected items get reset on using filters.
- TabMenu: Tooltip does not work using tooltip field HOT 1
- Tooltip: Uncaught TypeError: Cannot read properties of null (reading 'style') HOT 7
- PrimeNg Table Cannot assign to read only property '0' of object '[object Array] HOT 2
- Rating: Fix broken unit tests
- AutoFocus | doesn't work in dialog
- Dialog: Fix broken unit test
- Tooltip | Tooltip is out of position after dialog opens HOT 1
- KeyFilter: No longer working on chips component
- Table Selection not cleared from table HOT 7
- Message: New severity not reflected in styles HOT 6
- Skeleton [size] property is no longer a string accepting rem values but instead expects shapes HOT 3
- TieredMenu:Tooltip property does not work on MenuItem HOT 1
- TreeSelect: ng-touched not working & add onFocus, onBlur events HOT 1
- TreeSelect: Panel does not hide on selected item HOT 1
- Dropdown: `attr.id` not applied to `input` element when `editable: true`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primeng.