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.

ERROR in Error encountered resolving symbol values statically

See original GitHub issue

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) Latest beta-24 branch

I am getting the error when I do the following in my app.

import * as services from './services';
import { Store } from './store';
const mapValuesToArray = (obj) => Object.keys(obj).map(key => obj[key]);

export const providers = [
  Store,
  ...mapValuesToArray(services)
];

And my appModule.ts providers

import { providers } from './index'
`providers: [providers, AnimationService],`

I get the following error. I can’t figure out what am doing wrong!

ERROR in Error encountered resolving symbol values statically. Reference to a local (non-exported) symbol 'mapValuesToAr..
ray'. Consider exporting the symbol (position 3:7 in the original .ts file), resolving symbol providers in D:/angular2/e
noeasy/src/app/index.ts, resolving symbol AppModule in D:/angular2/myapp/src/app/app.module.ts, resolving symbol AppMo..
dule in D:/angular2/myapp/src/app/app.module.ts

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
baruchvlzcommented, Jan 8, 2017

The error seems to give you the solution.

Change const mapValuesToArray = (obj) => Object.keys(obj).map(key => obj[key]); to export const mapValuesToArray = (obj) => Object.keys(obj).map(key => obj[key]);.

Also, this is a StackOverflow question rather than an issue with the CLI

0reactions
angular-automatic-lock-bot[bot]commented, Sep 6, 2019

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

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR in Error encountered resolving symbol values ...
Show activity on this post. However, this error can be "resolved" by saving any file and trigger the recompile (weird).
Read more >
ERROR in Error encountered resolving symbol ... - GitHub
ERROR in Error encountered resolving symbol values statically. Calling function 'PerfectScrollbarModule', function calls are not supported.
Read more >
Error encountered resolving symbol values statically - O'Reilly
Solution #3: Error encountered resolving symbol values statically. Consider the third complete error mentioned in the Preparing to use webpack section:
Read more >
Error encountered resolving symbol values statically
I was trying to build an APK for my app using ionic cordova build android --prod --release but I'm getting the following error...
Read more >
ERROR in Error encountered resolving symbol ... - MSDN
Our Application is written in Nodejs & Angular 2. We are currently using Visual Studio Online for Git & publishing the code in...
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