I have been unable to fix this error or determine the cause. No code has changed, so I assume it is a result of an NPM package being updated. Here is the error log to the console. This is for an Angular2 application.
ERROR in [at-loader] ./node_modules/#types/popper.js/index.d.ts:6:19
TS2300: Duplicate identifier 'Popper'.
ERROR in [at-loader] ./node_modules/#types/popper.js/index.d.ts:89:15
TS2300: Duplicate identifier 'Popper'.
ERROR in [at-loader] ./node_modules/#types/popper.js/index.d.ts:104:3
TS2300: Duplicate identifier 'default'.
ERROR in [at-loader] ./node_modules/popper.js/index.d.ts:8:19
TS2300: Duplicate identifier 'Popper'.
ERROR in [at-loader] ./node_modules/popper.js/index.d.ts:113:15
TS2300: Duplicate identifier 'Popper'.
ERROR in [at-loader] ./node_modules/popper.js/index.d.ts:120:43
TS2694: Namespace 'Popper' has no exported member 'ReferenceObject'.
ERROR in [at-loader] ./node_modules/popper.js/index.d.ts:130:3
TS2300: Duplicate identifier 'default'.
Here is my tsconfig.json file:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"../node_modules/#types/"
]
},
"compileOnSave": true,
"exclude": [
"node_modules/*",
"**/*-aot.ts"
]
}
Here is my package.json file as you requested. I think the problem is that one of these package is upgrading to an unstable version, because I had not been receiving this error in the past:
{
"name": "truerec-verifier-landing-page",
"version": "1.0.0",
"description": "TrueRec verifier web.",
"scripts": {
"start": "webpack-dev-server --inline --progress --port 8080",
"test": "karma start karma.webpack.conf.js",
"build": "rm -rf dist/* && webpack --config config/webpack.prod.js --bail",
"dev": "rm -rf dist/* && webpack --config config/webpack.dev.js --bail"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"#angular/animations": "~4.1.1",
"#angular/common": "~4.1.1",
"#angular/compiler": "~4.1.1",
"#angular/compiler-cli": "~4.1.1",
"#angular/core": "~4.1.1",
"#angular/forms": "~4.1.1",
"#angular/http": "~4.1.1",
"#angular/platform-browser": "~4.1.1",
"#angular/platform-browser-dynamic": "~4.1.1",
"#angular/platform-server": "~4.1.1",
"#angular/router": "~4.1.1",
"#angular/tsc-wrapped": "~4.1.1",
"#angular/upgrade": "~4.1.1",
"angular-in-memory-web-api": "~0.3.1",
"angular2-recaptcha": "^0.4.1",
"core-js": "^2.4.1",
"jquery": "^3.2.1",
"js-sha3": "^0.5.7",
"ng2-pdf-viewer": "^1.1.0",
"ng2-semantic-ui": "^0.8.4",
"ng2-toastr": "^4.1.2",
"ngx-cookie": "^1.0.0",
"pdfjs-dist": "^1.8.430",
"rxjs": "5.0.1",
"zone.js": "0.8.12"
},
"devDependencies": {
"#types/google.analytics": "0.0.33",
"#types/jasmine": "2.5.36",
"#types/node": "^6.0.45",
"angular2-template-loader": "^0.6.0",
"awesome-typescript-loader": "^3.0.4",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "2.0.0-beta.5",
"file-loader": "^0.9.0",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.16.1",
"jasmine": "~2.4.1",
"jasmine-core": "~2.4.1",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.1",
"less": "^2.7.2",
"less-loader": "^4.0.4",
"lodash": "^4.16.2",
"null-loader": "^0.1.1",
"phantomjs-prebuilt": "2.1.13",
"protractor": "~4.0.14",
"raw-loader": "^0.5.1",
"request": "^2.81.0",
"resolve-url-loader": "^2.0.2",
"rimraf": "^2.5.4",
"style-loader": "^0.13.1",
"to-string-loader": "^1.1.5",
"tslint": "^3.15.1",
"typescript": "~2.3.0",
"webpack": "2.2.1",
"webpack-dev-server": "2.4.1",
"webpack-merge": "^3.0.0"
},
"repository": {}
}
I ran into this same issue yesterday when I cloned a repo onto a new machine and did an NPM install to get the packages - same exact error. My project is also using the ng2-semantic-ui package. Ng2-semantic-ui has a dependency on both Popper.js and #types\popper (typescript definitions).
"dependencies": {
"#angular/common": "^4.1.0",
"#angular/core": "^4.1.0",
"#angular/forms": "^4.1.0",
"#types/popper.js": "^1.8.0",
"element-closest": "^2.0.2",
"popper.js": "^1.0.6",
"rxjs": "^5.0.1"
},
I was able to compare the packages of my original with the new an I noticed that popper.js now has typescript definitions included (index.d.ts). It looks like they were introduced in 1.11.1 - I have 1.10.8 on my working version and 1.12.1 on my machine with the "broken" build (same error as yours).
The source of the error and duplicate identifiers are the duplicate type definitions for popper.js.
I'm going to open up an issue over on ng2-semantic-ui and see if we can get the dependency on #types/popper.js removed as it's not needed with the latest version of popper.js. In the mean time, I removed the #types/popper.js and was able to get a good build. Hope this helps!
UPDATE: This issue looks to be resolved in a hotfix 3 weeks ago in version 0.9.4 (issue 195) (https://github.com/edcarroll/ng2-semantic-ui/releases/tag/v0.9.4). Update your dependency version in your package.json and you should be good to go.
Related
I try to found solutions, on this problem...
Because, is not on my code...
Its is after update to latest npm and fs-extra...
Build at: 2022-03-16T13:33:13.718Z - Hash: aeac85e5815ce0c4 - Time: 7748ms
Error: node_modules/#angular-devkit/build-angular/node_modules/#angular-devkit/build-webpack/src/webpack-dev-server/index.d.ts:26:121 - error TS2307: Cannot find module '../../.
./core/src' or its corresponding type declarations.
26 declare const _default: import("#angular-devkit/architect/src/internal").Builder<WebpackDevServerBuilderSchema & import("../../../core/src").JsonObject>;
~~~~~~~~~~~~~~~~~~~
Error: node_modules/#angular-devkit/build-angular/node_modules/#angular-devkit/build-webpack/src/webpack/index.d.ts:30:116 - error TS2307: Cannot find module '../../../core/src'
or its corresponding type declarations.
30 declare const _default: import("#angular-devkit/architect/src/internal").Builder<RealWebpackBuilderSchema & import("../../../core/src").JsonObject>;
~~~~~~~~~~~~~~~~~~~
Error: node_modules/#angular-devkit/build-angular/node_modules/webpack-dev-middleware/types/index.d.ts:204:27 - error TS2694: Namespace '"fs"' has no exported member 'StatSyncFn
'.
204 statSync?: import("fs").StatSyncFn;
Somebody having like solutions on this ?...
I have try to re-install webpack-server, all indicated...
Nothing to do...I don't understound why that's not working...
How to proceed...?
Thanks to us for your help...
Here to package.json
"name": "bonrefil",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"#angular/animations": "~13.0.0",
"#angular/cdk": "^13.2.6",
"#angular/common": "~13.0.0",
"#angular/compiler": "~13.0.0",
"#angular/core": "~13.0.0",
"#angular/forms": "~13.0.0",
"#angular/material": "^13.2.6",
"#angular/platform-browser": "~13.0.0",
"#angular/platform-browser-dynamic": "~13.0.0",
"#angular/router": "~13.0.0",
"bootstrap": "^5.1.3",
"bootstrap-icons": "^1.7.2",
"fs-extra": "^10.0.1",
"image-to-base64": "^2.2.0",
"jquery": "^3.6.0",
"popper.js": "^1.16.1",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"uuid": "^8.3.2",
"xdata": "^2.1.17",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^13.2.6",
"#angular-devkit/core": "^13.2.6",
"#angular/cli": "~13.0.3",
"#angular/compiler-cli": "~13.0.0",
"#nguniversal/builders": "^13.0.2",
"#types/jasmine": "~3.10.0",
"#types/jquery": "^3.5.9",
"#types/node": "^12.20.46",
"#types/uuid": "^8.3.4",
"#types/webpack-dev-server": "^4.7.2",
"bootstrapvalidator": "^0.5.4",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.4.3",
"webpack": "^5.70.0",
"webpack-dev-middleware": "^5.3.1",
"webpack-dev-server": "^4.7.4"
}
}
You need to update your #types/node version. If you update to at least 15.12.2 it should now work: See https://app.renovatebot.com/package-diff?name=#types%2Fnode&from=13.13.5&to=15.12.2
When attempting to build an angular app, this error comes up:
node_modules/#angular/cdk/schematics/utils/html-manipulation.d.ts:9:10 - error TS2305: Module '"../../../../#types/parse5"' has no exported member 'DefaultTreeElement'.
Angular 11.2.14
Angular CLI: 11.2.13
Node: 14.17.0
I'm working with 4 more people using the same app and nobody is having this problem.
I've tried the following solutions that didn't work:
Delete the entire app and clone it back in from git.
Clear the node_modules and install it all over again.
Updated Node.js (to the current one)
Updated npm (to the current one)
Updated Angular CLI (to the current one)
Installed #types/parse5 (using npm install #types/parse5)
In between every of these I did a npm cache clean -f
This is how the package.json is right now:
{
"name": "rferp",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "ngcc"
},
"private": true,
"dependencies": {
"#angular-devkit/build-angular": "^0.1102.5",
"#angular-devkit/core": "^11.2.5",
"#angular/animations": "^11.2.6",
"#angular/cdk": "^11.2.13",
"#angular/common": "^11.2.14",
"#angular/compiler": "^11.2.14",
"#angular/core": "^11.2.14",
"#angular/flex-layout": "^11.0.0-beta.33",
"#angular/forms": "^11.2.14",
"#angular/platform-browser": "^11.2.14",
"#angular/platform-browser-dynamic": "^11.2.14",
"#angular/router": "^11.2.14",
"#fullcalendar/core": "^5.4.0",
"#fullcalendar/daygrid": "^5.4.0",
"#fullcalendar/interaction": "^5.4.0",
"#fullcalendar/rrule": "^5.4.0",
"#fullcalendar/timegrid": "^5.4.0",
"#ngrx/component-store": "^11.0.1",
"#ngrx/effects": "^11.0.1",
"#ngrx/entity": "^11.0.1",
"#ngrx/router-store": "^11.0.1",
"#ngrx/store": "^11.0.1",
"#ngrx/store-devtools": "^11.0.1",
"#types/bingmaps": "0.0.0",
"#types/node": "^13.13.33",
"#types/parse5": "^6.0.0",
"azure-maps-control": "^2.0.32",
"azure-maps-drawing-tools": "^0.1.6",
"chart.js": "^2.9.4",
"clone": "^2.1.2",
"core-js": "^3.8.0",
"exceljs": "^4.2.0",
"file-saver": "^2.0.5",
"font-awesome": "^4.7.0",
"moment": "^2.29.1",
"ng-azure-maps": "^4.0.0",
"parse5": "^6.0.1",
"prettier": "^2.2.0",
"primeicons": "^4.1.0",
"primeng": "^11.4.2",
"quill": "^1.3.7",
"rrule": "^2.6.6",
"rxjs": "~6.6.6",
"ts-node": "^8.10.2",
"tslib": "^2.0.0",
"zone.js": "^0.10.3"
},
"devDependencies": {
"#angular/cli": "^11.2.5",
"#angular/compiler-cli": "^11.2.6",
"#angular/language-service": "^11.2.6",
"#fortawesome/fontawesome-pro": "^5.15.1",
"#types/jasmine": "^3.6.2",
"#types/jasminewd2": "^2.0.6",
"#typescript-eslint/eslint-plugin": "^2.34.0",
"#typescript-eslint/parser": "^2.34.0",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.3",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.2.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^11.0.3",
"protractor": "~7.0.0",
"resize-observer-polyfill": "^1.5.1",
"typescript": "4.0.2"
}
}
I had the same problem, suddenly a few days ago.
Also using Angular 11.
Somehow the parse5 package was updated to version 6.0.1, I think, because reverting back to 5.0.0 fixed it.
I am trying to build my angular application using 'ng build'. It is failing because it is running out of memory to build as I surmise from my research. I have tried several of the solutions out there with no luck. After typing 'ng build' either from VSC terminal or on DOS line, it runs for about 3 minutes during this step:
Generating ES5 bundles for differential loading...
then it fails with this error written to my angular-errors.log file:
[error] Error: Call retries were exceeded
at ChildProcessWorker.initialize (c:\development\gems\Frontend_Serenity_A9_SLIM\Frontend_Serenity_A9\node_modules\jest-worker\build\workers\ChildProcessWorker.js:193:21)
at ChildProcessWorker.onExit (c:\development\gems\Frontend_Serenity_A9_SLIM\Frontend_Serenity_A9\node_modules\jest-worker\build\workers\ChildProcessWorker.js:263:12)
at ChildProcess.emit (events.js:203:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
I have tried increasing my memory as some articles/stack overflows have indicated. I tried this:
npm install -g increase-memory-limit
and then ran this command at the root of my angular project:
increase-memory-limit
to no avail. Using es5 rather than es2015 is not a solution for our app. Any help or ideas you can offer are GREATLY appreciated. I have been trying everything for a week now and am still stuck. Thanks!
package.json contents:
{
"name": "serenity",
"version": "9.0.0",
"license": "PrimeNG Commercial",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "9.0.4",
"#angular/cdk": "9.1.0",
"#angular/common": "9.0.4",
"#angular/compiler": "9.0.4",
"#angular/core": "9.0.4",
"#angular/forms": "9.0.4",
"#angular/material": "^9.1.0",
"#angular/platform-browser": "9.0.4",
"#angular/platform-browser-dynamic": "9.0.4",
"#angular/router": "9.0.4",
"#aspnet/signalr": "^1.1.4",
"#fullcalendar/core": "4.0.2",
"#fullcalendar/daygrid": "4.0.1",
"#fullcalendar/interaction": "4.0.2",
"#fullcalendar/timegrid": "4.0.1",
"#handsontable/angular": "^5.1.1",
"#mdi/svg": "^5.3.45",
"#types/leaflet-draw": "^1.0.2",
"#types/plotly.js": "^1.50.12",
"chart.js": "2.7.3",
"d3": "^5.16.0",
"font-awesome": "4.7.0",
"handsontable": "^7.4.2",
"intl": "1.2.5",
"leaflet": "^1.6.0",
"leaflet-draw": "^1.0.4",
"leaflet-sidebar-v2": "^3.2.2",
"leaflet.control.layers.tree": "^1.0.0",
"leaflet.glify": "^3.0.0",
"material-design-icons": "^3.0.1",
"plotly.js-dist": "^1.54.1",
"primeflex": "1.0.0",
"primeng": "9.0.1",
"prismjs": "1.15.0",
"quill": "1.1.8",
"rxjs": "6.5.4",
"three": "^0.117.1",
"web-animations-js": "github:angular/web-animations-js#release_pr208",
"xlsx": "^0.16.2",
"zone.js": "0.10.2"
},
"devDependencies": {
"#angular-devkit/build-angular": "0.900.4",
"#angular/cli": "9.0.4",
"#angular/compiler-cli": "9.0.4",
"#angular/language-service": "9.0.4",
"#types/jasmine": "3.5.7",
"#types/jasminewd2": "2.0.8",
"#types/leaflet": "^1.5.17",
"#types/node": "12.12.29",
"codelyzer": "5.2.1",
"jasmine-core": "3.5.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.3.0",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "2.1.1",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.5.2",
"protractor": "5.4.3",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "3.7.5"
}
}
Note sure if this will help in your case, but have you tried increasing the maximumError in the budgets section under configurations in the angular.json file?
Yes, it was a memory issue and I was having a hard time getting node to change the memory limit before it built my project. I was able to get it to allocate 3 gigs and then it worked fine.
My ionic environment becomes unstable after updation nodejs from v8.1 to v12..
Any idea what all i have to update?
[abc]$ ionic cordova emulate android
ng run app:ionic-cordova-build --platform=android
An unhandled exception occurred: Cannot find module '#angular/compiler-cli/src/tooling'
Require stack:
-
- /home/user/workspace1/node_modules/#ngtools/webpack/src/index.js
- /home/user/workspace1/node_modules/#angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/typescript.js
- /home/user/workspace1/node_modules/#angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/index.js
- /home/user/workspace1/node_modules/#angular-devkit/build-angular/src/browser/index.js
- /home/user/workspace1/node_modules/#angular/cli/node_modules/#angular-devkit/architect/node/node-modules-architect-host.js
- /home/user/workspace1/node_modules/#angular/cli/node_modules/#angular-devkit/architect/node/index.js
- /home/user/workspace1/node_modules/#angular/cli/models/architect-command.js
- /home/user/workspace1/node_modules/#angular/cli/commands/run-impl.js
- /home/user/workspace1/node_modules/#angular/cli/node_modules/#angular-devkit/schematics/tools/export-ref.js
- /home/user/workspace1/node_modules/#angular/cli/node_modules/#angular-devkit/schematics/tools/index.js
- /home/user/workspace1/node_modules/#angular/cli/utilities/json-schema.js
- /home/user/workspace1/node_modules/#angular/cli/models/command-runner.js
- /home/user/workspace1/node_modules/#angular/cli/lib/cli/index.js
- /home/user/workspace1/node_modules/#angular/cli/lib/init.js
- /home/user/workspace1/node_modules/#angular/cli/bin/ng
See "/tmp/ng-wzIyd3/angular-errors.log" for further details.
[ERROR] An error occurred while running subprocess ng.
ng run app:ionic-cordova-build --platform=android exited with exit code 127.
Here is package.json
{
"name": "test",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/common": "^8.1.0",
"#angular/core": "^8.1.0",
"#angular/forms": "^8.1.0",
"#angular/http": "^7.2.16",
"#angular/platform-browser": "^8.1.0",
"#angular/platform-browser-dynamic": "^8.1.0",
"#angular/router": "^8.1.0",
"#ionic-native/android-permissions": "^5.27.0",
"#ionic-native/camera": "^5.27.0",
"#ionic-native/core": "^5.26.0",
"#ionic-native/splash-screen": "^5.26.0",
"#ionic-native/status-bar": "^5.26.0",
"#ionic-native/uid": "^5.26.0",
"#ionic-native/unique-device-id": "^5.26.0",
"#ionic/angular": "^5.2.3",
"#ionic/angular-toolkit": "^2.2.0",
"#ionic/pro": "2.0.4",
"cordova-android": "^8.1.0",
"cordova-hot-code-push-plugin": "1.5.3",
"cordova-plugin-android-permissions": "1.0.2",
"cordova-plugin-camera": "4.1.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-file": "6.0.2",
"cordova-plugin-filepath": "1.5.8",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^3.1.2",
"cordova-plugin-splashscreen": "^5.0.4",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-unique-device-id2": "2.0.0",
"cordova-plugin-uniquedeviceid": "1.3.2",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-sqlite-storage": "5.0.0",
"core-js": "^2.6.11",
"rxjs": "~6.3.3",
"zone.js": "~0.8.29"
},
"devDependencies": {
"#angular-devkit/architect": "^0.1000.3",
"#angular-devkit/build-angular": "^0.1000.3",
"#angular-devkit/core": "^10.0.3",
"#angular-devkit/schematics": "^10.0.3",
"#angular/cli": "^8.3.28",
"#angular/compiler": "^7.2.16",
"#angular/compiler-cli": "^7.2.16",
"#angular/language-service": "^7.2.16",
"#ionic/app-scripts": "^3.2.4",
"#types/jasmine": "^2.8.17",
"#types/jasminewd2": "^2.0.8",
"#types/node": "^10.12.30",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.4",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.6",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.4",
"ts-node": "^8.0.3",
"tslint": "~5.12.0",
"typescript": "~3.1.6"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-hot-code-push-plugin": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-file": {},
"cordova-sqlite-storage": {},
"cordova-plugin-filepath": {},
"cordova-plugin-android-permissions": {}
},
"platforms": []
}
}
Try this:
Update Ionic to the latest version: npm install -g ionic#latest
Remove node_modules folder, then npm install to put it back all the dependencies with the new Ionic version reflected with the updated node version.
#dev.doc ...Highly appreciate your response...
There is change in error,I hope it past the error
npm install #angular/compiler-cli#latest
npm install #angular/cli#latest
which brings to different error now..
> ng run app:ionic-cordova-build --platform=android
An unhandled exception occurred: Object prototype may only be an Object or null: undefined
See "/tmp/ng-ZAbd9i/angular-errors.log" for further details.
[ERROR] An error occurred while running subprocess ng.
ng run app:ionic-cordova-build --platform=android exited with exit code 127.
Re-running this command with the --verbose flag may provide more information.
...details--------
[error] TypeError: Object prototype may only be an Object or null: undefined
at setPrototypeOf (<anonymous>)
at Object.__extends (../workspace/node_modules/#angular/compiler-cli/node_modules/tslib/tslib.js:68:9)
at ..ion/mygrd/node_modules/#angular/compiler-cli/src/ngtsc/indexer/src/template.js:118:17
at ..ion/mygrd/node_modules/#angular/compiler-
My updated package.json reflects the version..it know its slightly higher that your version..
"#angular/cli": "^10.0.3",
"#angular/compiler-cli": "^10.0.4"
Im trying to add gpio support to a project on my raspberry pi 3 model B but i keep encountering an error with bindings when i try to ng serve my app. This problem persists when I try to use any other gpio package.
WARNING in ./node_modules/rpi-gpio/node_modules/bindings/bindings.js
76:22-40 Critical dependency: the request of a dependency is an expression
...
...
...
# ./node_modules/rpi-gpio/node_modules/bindings/bindings.js
# ./node_modules/rpi-gpio/node_modules/epoll/epoll.js
# ./node_modules/rpi-gpio/rpi-gpio.js
# ./src/app/ui/...
# ./src/app/app.module.ts
# ./src/main.ts
# multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
WARNING in ./node_modules/rpi-gpio/node_modules/bindings/bindings.js
76:43-53 Critical dependency: the request of a dependency is an expression
...
...
...
# ./node_modules/rpi-gpio/node_modules/bindings/bindings.js
# ./node_modules/rpi-gpio/node_modules/epoll/epoll.js
# ./node_modules/rpi-gpio/rpi-gpio.js
# ./src/app/ui/...
# ./src/app/app.module.ts
# ./src/main.ts
# multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
I'm trying to use rpi-gpio (www.npmjs.com/package/rpi-gpio)(I installed all dependencies seperatly aswell).
Versions:
node: v9.3.0 (using nvm)
npm: 5.6.0
gcc: (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516
Package.json:
{
"name": "pagode-shotterkas",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "^5.1.2",
"#angular/cdk": "^5.0.2",
"#angular/common": "^5.1.2",
"#angular/compiler": "^5.1.2",
"#angular/core": "^5.1.2",
"#angular/forms": "^5.1.2",
"#angular/http": "^5.1.2",
"#angular/material": "^5.0.2",
"#angular/platform-browser": "^5.1.2",
"#angular/platform-browser-dynamic": "^5.1.2",
"#angular/router": "^5.1.2",
"angular4-drag-drop": "^1.1.2",
"bindings": "^1.3.0",
"cordova-plugin-eid": "^1.0.0",
"core-js": "^2.5.3",
"epoll": "^1.0.2",
"hammerjs": "^2.0.8",
"nan": "^2.8.0",
"promise-polyfill": "^6.1.0",
"rpi-gpio": "^0.9.1",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
"devDependencies": {
"#angular/cli": "^1.6.2",
"#angular/compiler-cli": "^5.1.2",
"#angular/language-service": "^5.1.2",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "~2.0.2",
"#types/node": "^6.0.95",
"codelyzer": "~3.1.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.3",
"karma-jasmine": "^1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.3.2",
"typescript": "~2.5.0"
}
}