Getting the following Error (ENOENT: no such file or directory, scandir)

318 views
Skip to first unread message

Muhammad Waqas Javed

unread,
Mar 7, 2017, 2:09:53 AM3/7/17
to Jenkins Users
Hi All,

I am new to test automation and currently encountering the following error. I am stuck and can't move forward with the test automation. I am using Jenkins
to develop the test automation framework and after running the SHELL code, I am getting the following error. I have already searched a lot on different
websites but am unable to get a satisfactory answer. I will really appreciate if anyone can help me in this regard. Please note that I really don't know 
much about programming. I am getting the following error (the code is that I execute is given in the last).

=> Errors while initializing project:

While reading package from
`/home/ubuntu/workspace/BuildRocketChatOnNode/Rocket.Chat-master/packages/rocketchat-katex`:
native: ENOENT: no such file or directory, scandir
'packages/rocketchat-katex/node_modules/katex/dist/fonts/'
at Error (native)
at Object.fs.readdirSync (fs.js:808:18)
at package.js:27:27


Build step 'Execute shell' marked build as failure
Finished: FAILURE



I run the following code. I have also asked for help from the developer of this code but didn't get any answer. 

        # clean up if any left overs from last build

   SCREEN_RUNNING='/usr/bin/pgrep SCREEN'

   if $SCREEN_RUNNING; then

       pkill SCREEN

       echo $SCREEN_RUNNING

   fi

        NODE_RUNNING='/usr/bin/pgrep node'

   if $NODE_RUNNING; then

       pkill node

       echo $NODE_RUNNING

   fi

   if [ -f master.zip ]; then

       rm -f master.zip

   fi

   INSTDIR=./Rocket.Chat-master

   if [ -d $INSTDIR ]; then

       rm -Rf $INSTDIR

   fi

   MONDIR=/home/ubuntu/db

   if [ -d $MONDIR ]; then

            rm -Rf /home/ubuntu/db

        fi

   pwd

  

   # Install packages we need for the build

   sudo apt-get install unzip

   curl https://install.meteor.com/ | sh

   sudo npm install -g n

   sudo n 0.10.40

 

        # Configure Mongo Database

   MONDIR=/home/ubuntu/db

   if [ ! -d $MONDIR ]; then

            mkdir /home/ubuntu/db

        fi

   pwd

 

   # Build and install Rocket Chat

   export PUBLIC_HOSTNAME="$(curl http://169.254.169.254/latest/meta-data/public-hostname 2>/dev/null)"

   wget https://github.com/RocketChat/Rocket.Chat/archive/master.zip

   unzip -o master.zip

   cd ./Rocket.Chat-master

   meteor build --server $PUBLIC_HOSTNAME --directory .

   cd ./bundle/programs/server

   npm install

   cd ../..

 

   # make sure processes continue to run when Jenkins script completes

   echo -e "\n"

   ps -ef

   export BUILD_ID=dontKillMe

   echo -e "\n"

 

   # start mongo DB and Rocket Chat

   screen -d -m /home/ubuntu/.meteor/packages/meteor-tool/.1.1.10/mt-os.linux.x86_64/dev_bundle/mongodb/bin/mongod --bind_ip localhost --dbpath /home/ubuntu/db/ --smallfiles

   sleep 10

   export MONGO_URL=mongodb://localhost:27017/rocketchat

        export ROOT_URL="http://$(curl http://169.254.169.254/latest/meta-data/public-hostname 2>/dev/null):3000"

   export PORT=3000

   screen -d -m node /home/ubuntu/workspace/BuildRocketChatOnNode/Rocket.Chat-master/bundle/main.js

   sleep 10

 

   # list system details and what's running on the system before we complete script

   echo -e "\n"

   pwd

   echo -e "\n"

   env

   echo -e "\n"

   ps -ef



Thanks
Reply all
Reply to author
Forward
0 new messages