Resolved by @alexzuza. Check out his solution below - major props!
The issue was with the node_modules folder in the ng2-opd-popup directory, it needed to be removed and the src/tsconfig.app.json
file had to be adjusted accordingly. Make sure to also refer to the comments for instructions on setting up rimraf to automatically exclude the node_modules folder during npm install.
This is the error message I encountered:
ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function
The suggested fix can be found here, but unfortunately it didn't work for me since my Angular version is 4.3.
package.json:
PopupModule.forRoot(),
tsconfig.json:
"paths": {
"@angular/*": ["node_modules/@angular/*"]
},
tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"paths": {
"@angular/common": ["../node_modules/@angular/common"],
"@angular/compiler": ["../node_modules/@angular/compiler"],
"@angular/core": ["../node_modules/@angular/core"],
"@angular/forms": ["../node_modules/@angular/forms"],
"@angular/platform-browser": ["../node_modules/@angular/platform-browser"],
"@angular/platform-browser-dynamic": ["../node_modules/@angular/platform-browser-dynamic"],
"@angular/router": ["../node_modules/@angular/router"],
"@angular/http": ["../node_modules/@angular/http"]
},
"lib": [
"es2017",
"dom"
]
}
}
tsconfig.app.json:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"paths": {
"@angular/*": ["../node_modules/@angular/*"]
},
"lib": [
"es2017",
"dom"
]
}
}
File structure snapshot: https://i.stack.imgur.com/IKsL7.png
The package causing issues: ng2-opd-popup
If anyone has a workaround for this problem or knows of a better alternative package to suggest, please let me know!