Posts

Showing posts with the label nodejs

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory Different

Image
 This is a common error I found when I upgrade from node 8.8 to node 10.1 within my mac osx seirra. > node build.js || nodejs build.js xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance node 10.1 is not a stable release and I had to backdate it with the stable version. In addition, to fix the issue I had to run few commands to identify the location of command line tools. https://stackoverflow.com/questions/18533761/find-out-the-path-location-to-command-line-tools-for-xcode?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa /usr/ bin / clang -- version Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin16.7.0 Thread model: po...

Docker Dev Environment with Nodemon and Mongo DB

Image
1 Install Docker  Community ediction and Composer https://blog.codeship.com/using-docker-compose-for-nodejs-development/ 2 . Sampe application resides in server folder which have the package.json file ensure package.json  has script.  "start": "nodemon -L index.js" ensure nodemon.json exhist 3. touch Dockerfile. FROM node:8.1.0-alpine RUN mkdir /server RUN npm install nodemon -g ADD ./server /server WORKDIR /server RUN npm install #ADD server/nodemon.json /server/nodemon.json EXPOSE 3000 CMD npm start 5. docker-compose build 6.touch docker-compose.yml version: '2' services:   web:     build: .     volumes:     - "./server:/server"     ports:       - "3000:3000"     links:       - mongo   mongo:     image: mongo:3.4.4     container_name: mongo     ports:       - "27017:27017" 7.docker-co...