Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

node registerAdmin.js fails #64

Open
francas opened this issue Aug 11, 2018 · 5 comments
Open

node registerAdmin.js fails #64

francas opened this issue Aug 11, 2018 · 5 comments

Comments

@francas
Copy link

francas commented Aug 11, 2018

I am following the EDX course and get the error below when trying to run node registerAdmin.js. What am I doing wrong?

auridas@auridas-VirtualBox:~/Projects/education/LFS171x/fabric-material/tuna-app$ node registerAdmin.js
/home/auridas/Projects/education/LFS171x/fabric-material/tuna-app/node_modules/fabric-client/lib/Client.js:746
async _createOrUpdateChannel(request, have_envelope) {
^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/home/auridas/Projects/education/LFS171x/fabric-material/tuna-app/node_modules/fabric-client/index.js:25:18)

@DamianLikszo
Copy link

DamianLikszo commented Aug 21, 2018

I had the same problem and I fixed it.
You must have:

  • node runtime LTS version 8.9.0 or higher, up to 9.0 ( Node v9.0+ is not supported )
  • npm tool version 5.5.1 or higher

Check It.

@deb21
Copy link

deb21 commented Oct 3, 2018

same issue . not working

@nathalie-ckc
Copy link

If you encounter problems in the course, it's always good to search the course Discussion forum to see if someone else found the solution. That's how I found this post by Indiefire & using nvm to get node v8.9.0 worked for me: https://courses.edx.org/courses/course-v1:LinuxFoundationX+LFS171x+3T2017/discussion/forum/i4x-LinuxFoundationX-LFS171x-course-3T_2017/threads/5b472605c5264809bd00139c

I've got a bunch of other feedback I want to submit for Chapter 7 for the effort to improve the edX course material in the import-edx-content branch, so I'll suggest to add that info to the troubleshooting tips.

nathalie-ckc added a commit to nathalie-ckc/education that referenced this issue Oct 8, 2018
'node registerAdmin.jsr' fails with syntax error. Some students also
filed Github issue hyperledger-archives#64 about this.

This post has the solution:
https://courses.edx.org/courses/course-v1:LinuxFoundationX+LFS171x+3T2017/discussion/forum/i4x-LinuxFoundationX-LFS171x-course-3T_2017/threads/5b472605c5264809bd00139c

I installed nvm using the instructions on the nvm github page README
at https://github.com/creationix/nvm

Then I did 'nvm install v8.9.0', as recommended by the discussion
post

Then I did 'npm install' again in the tuna-app directory, but got
warnings about high risk vulnerabilities, so I ran the commands
recommended in the warnings:

    npm I npm@latest -g
    npm install
    npm audit fix

did ‘npm install’ again & just low risk vulnerabilities remaining.

Was able to continue with the exercise from here.

I propose to add to add another Troubleshooting section with the
suggestion that you might need v8.9.0 and give the pointer to the nvm
repo to install nvm, 'nvm install v8.9.0' and repeat 'npm install'

Signed-off-by: nathalie-ckc <[email protected]>
@vishal3152
Copy link

I had faced the same issue. Here is a utility application that does the same with ease.
https://github.com/vishal3152/RegisterUser

@francas
Copy link
Author

francas commented Mar 31, 2019

Thanks, installing node 8.9.0 worked for me as well.

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

No branches or pull requests

5 participants