Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build ERROR : Cannot read property 'ACCOUNT' of undefined #13

Open
JayakrishnanJK opened this issue May 22, 2019 · 9 comments
Open

Build ERROR : Cannot read property 'ACCOUNT' of undefined #13

JayakrishnanJK opened this issue May 22, 2019 · 9 comments
Assignees

Comments

@JayakrishnanJK
Copy link

yarn run v1.3.2
$ cross-env NODE_ENV=development; node scripts/nodemon;
/srv/src/src/config.js:70
[RESOURCES.ACCOUNT]: {
^

TypeError: Cannot read property 'ACCOUNT' of undefined
at Object. (/srv/src/src/config.js:70:14)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/srv/src/src/index.js:5:5)
at Module._compile (module.js:643:30)
Nodemon crashed. Waiting for changes to restart.

We are getting this error while trying to build the fhir facade .
Please help on this.

@JayakrishnanJK
Copy link
Author

@jonterrylee can you please help on this

@jonterrylee jonterrylee self-assigned this May 28, 2019
@jonterrylee
Copy link
Collaborator

Looks like you might be using an old/bad version. Let me take a look.

@JayakrishnanJK
Copy link
Author

@jonterrylee No , we are using the latest version.

@JayakrishnanJK
Copy link
Author

@jonterrylee can you please help on this . because of this error we cannot use the latest version 2.0. We have reverted to V 1.4.

Looking for your prompt action on this.
Thank you

@jonterrylee
Copy link
Collaborator

@JayakrishnanJK

Sorry we have been swamped and haven't had the time to fix this issue. We would need to update the generator to support version 2.0.

We are unfortunately at a conference this week but we will try to address this in the upcoming weeks.

@joepaquette
Copy link

The problem appears to be in config.js -> const { VERSIONS, RESOURCES } = require('@asymmetrik/node-fhir-server-core').constants;

RESOURCES does not exist in @asymmetrik/node-fhir-server-core/constants.js

@cmthomps
Copy link

cmthomps commented Sep 2, 2019

@JayakrishnanJK - Did you figure this out?

@JayakrishnanJK
Copy link
Author

@cmthomps No actually . now we are using thr old versionV 1.4. because of this error we cannot use the latest version 2.0. We have reverted to V 1.4.

@sychus
Copy link

sychus commented May 28, 2020

@cmthomps No actually . now we are using thr old versionV 1.4. because of this error we cannot use the latest version 2.0. We have reverted to V 1.4.

Hi! I had to add the following:
exports.RESOURCES = {
ACCOUNT: 'ACCOUNT',
PATIENT: 'PATIENT',
and so on
}
The problem is that you have to touch the constants.js file that is in the fhir-server-core but at least it will work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants