Brainvisualizer error in the building phase - ansistyles


#1

Hi,

every time I build the platform because I added new “Models” (command
./update_nrp build
in the user_scripts folder to rebuilt from GazeboRosPackage and the following brainvisualizer, ExDFrontend, nrpBackendProxy, SlurmClusterMonitor, gzweb and Models folders), I encounter this error:


brainvisualizer

npm WARN brainvisualizer@1.3.10 license should be a valid SPDX license expression

npm ERR! path /home/elisa/Documents/NRP/brainvisualizer/node_modules/npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename ‘/home/elisa/Documents/NRP/brainvisualizer/node_modules/npm/node_modules/ansistyles’ -> ‘/home/elisa/Documents/NRP/brainvisualizer/node_modules/npm/node_modules/.ansistyles.DELETE’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/elisa/.npm/_logs/2018-02-16T11_54_15_216Z-debug.log
brainvisualizer INSTALL ERROR

If I download again from the repository the folders brainvisualizer, ExDFrontend, nrpBackendProxy, SlurmClusterMonitorand and I do again part of the installation procedure, the error is not showed anymore. Is there any other faster way to solve this error?
Thank you a lot.
Kind regards,

Elisa


#2

Hi Elisa,

cd $HBP/brainvisualizer
rm -rf node_modules
npm install

I hope it helps.

Regards,
Manos


#3

Hi Manos,

thank you for your help.
I tried what you suggested and now I have this error after

cd $HBP/user_scripts
./update_nrp build


brainvisualizer

npm WARN brainvisualizer@1.3.10 license should be a valid SPDX license expression

npm ERR! path /home/elisa/Documents/NRP/brainvisualizer/node_modules/npm/node_modules/fstream
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename ‘/home/elisa/Documents/NRP/brainvisualizer/node_modules/npm/node_modules/fstream’ -> ‘/home/elisa/Documents/NRP/brainvisualizer/node_modules/npm/node_modules/.fstream.DELETE’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/elisa/.npm/_logs/2018-02-16T13_51_45_589Z-debug.log
brainvisualizer INSTALL ERROR

Kind regards,

Elisa


#4

Hi Elisa,

Could you try node -v in a terminal and paste the result here? We recently migrated to the latest version of NodeJS, so maybe your computer is using still an old version.

Regards,
Manos


#5

Hi Manos,

this is my result:

v8.9.4

Thanks,
Elisa


#6

Hi Elisa,

This is fine. If removing the node_modules does not work then I am not sure what could be wrong. In any case we are working on impoving the build script so that it detects if something goes wrong with the javascript packages, and heal them automatically. It should be available in one week or two. Until then I am afraid that you can only remove the node_modules and rebuild.

Regards,
Manos


#7

Hi Manos,

I eventually solved the problem, even though it is still not clear what was wrong.
Below I write my solution just in case someone else encountering the same problem before that the new build script will be ready.

  • I deleted the brainvisualizer, ExDFrontend, nrpBackendProxy, SlurmClusterMonitorand folders from the NRP folder
  • I downloaded them again from the repository

cd $HBP
git clone https://bitbucket.org/hbpneurorobotics/brainvisualizer
git clone https://bitbucket.org/hbpneurorobotics/ExDFrontend
git clone https://bitbucket.org/hbpneurorobotics/nrpBackendProxy
git clone https://bitbucket.org/hbpneurorobotics/SlurmClusterMonitor

Now, the platform seems to work, also with the new “Models” I added before.
It is not the fastest procedure, but it solved the problem so far.

Kind regards,
Elisa


#8

Hi Elisa,

Thanks a lot for posting your solution. I am surprised that removing the node_modules was not enough though. We ll make sure to fix this problem in the future, thanks for reporting it.

Regards,
Manos


#9

Hi

I had the same error, and trying the approach of removing node_modules also led to the same result. But I tried it with Elisas approach and it seems to work after building all.
But you can correct the last git clone line to
git clone https://bitbucket.org/hbpneurorobotics/SlurmClusterMonitor

I do look forward to the fix, as I have to redo this procedure every time I rebuild/update, because I get the same error, and it takes a ton of time

Thanks

Best, Akshay


#10

I also found that just repeating steps 8-9 seems to suffice (assuming steps 6-7 had been taken before)