I encountered a problem with my NS NG2 app. Every time I attempt to execute the command tns livesync android --watch
, or any other build command, a lengthy list of errors pops up. Here is a snippet of these errors.
app/node_modules/typescript/lib/lib.es6.d.ts(20054,15): error TS2451: Cannot red
eclare block-scoped variable 'name'.
app/node_modules/typescript/lib/lib.es6.d.ts(20328,6): error TS2300: Duplicate i
dentifier 'AAGUID'.
...
This is just a very small portion of the errors I am facing.
The issue arose when I switched from working on my Mac to my PC. After pulling the minor code changes I made (I have already tried reverting them) and attempting to build, this error list appeared. Below are some key files that may assist in finding the solution.
package.json
{
"description": "AppName",
...
references.d.ts
/// <reference path="./node_modules/tns-core-modules/tns-core-modules.d.ts" /> Needed for autocompletion and compilation.
/// <reference path="./node_modules/nativescript-plugin-firebase/index.d.ts" />
...
tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
...
},
"exclude": [
"node_modules",
"platforms"
]
}