Hi,
This are the logs from the Cloud platform. However it may be the case that an npm install (or some integrity check) is performed before the app is started. We are start the app with "node server.js". There shouldn't any npm activity involved. The PCF uses so calld buildpacks to enable running different application stacks on its platform. And this buildpacks may perform this integrity check.
The app is completely build with Jenkins and the whole result (our code and the third party code within the node_modules) is pushed on the platform. We are also changing the user agent on the Jenkins server according to the version of the node buildpack such that no additional internet access is necessary when the application is pushed on the cloud.
Can you please explain to me what the following property "_from" in the code snippet below does? Because it is the only property that contains "protobuf@" in our whole node_modules. We are assuming that the package.json is somehow "malformed".
{
"name": "appdynamics-protobuf",
"version": "4.4.9",
"description": "Protocol Buffers for NodeJS",
"author": "",
"main": "./index.js",
"engines": {
"node": ">= 0.8.0 <=v9.*"
},
"repository": {
"type": "git",
"url": "git://github.com/chrisdew/protobuf.git"
},
"scripts": {
"test": "node test/unittest.js"
},
"gypfile": true,
"readme": "This is a fork of http://code.google.com/p/protobuf-for-node/\n\nIt now works with the NodeJS 0.8.x series.\n\nTo install, just type:\n\n npm install protobuf\n\nThanks to work by seishun, it now uses node-gyp and has google's protocol bufferes library integrated, so no separate installtion required.\n\nAll the best,\n\nChris.\n\nP.S. Breaking change in 0.8.6:\nuint64 and int64 are now read as Javascript Strings, rather than floating point numbers. They can still be set from Javascript Numbers (as well as from string).\n\nP.P.S. Here's an example I did for https://github.com/chrisdew/protobuf/issues/29 - most users won't need the complication of `bytes` fields.\n\nbuftest.proto\n\n package com.chrisdew.buftest;\n\n message BufTest {\n optional float num = 1;\n optional bytes payload = 2;\n }\n\nbuftest.js\n\n var fs = require('fs');\n var Schema = require('protobuf').Schema;\n\n // \"schema\" contains all message types defined in buftest.proto|desc.\n var schema = new Schema(fs.readFileSync('buftest.desc'));\n\n // The \"BufTest\" message.\n var BufTest = schema['com.chrisdew.buftest.BufTest'];\n\n var ob = { num: 42 };\n ob.payload = new Buffer(\"Hello World\");\n\n var proto = BufTest.serialize(ob);\n console.log('proto.length:', proto.length);\n\n var outOb = BufTest.parse(proto);\n console.log('unserialised:', JSON.stringify(outOb));\n\n var payload = new Buffer(outOb.payload);\n console.log(payload);\n\nMakefile: (second line begins with a TAB not spaces)\n\n all:\n protoc --descriptor_set_out=buftest.desc --include_imports buftest.proto\n\n\noutput:\n\n $ node buftest.js \n proto.length: 18\n unserialised: {\"num\":42,\"payload\":{\"0\":72,\"1\":101,\"2\":108,\"3\":108,\"4\":111,\"5\":32,\"6\":87,\"7\":111,\"8\":114,\"9\":108,\"10\":100,\"length\":11}}\n payload: <Buffer 48 65 6c 6c 6f 20 57 6f 72 6c 64>\n\n\n\n\n\n\n\n\n\nOlder instructions for use with the NodeJS 0.6.x series.\n========================================================\n\nPrerequisites:\n--------------\n\nNodeJS v0.6.X\nnpm\n\n\nTo install on Ubuntu and OSX:\n-------------------------------\n\nThe first steps are to build and install Google's protobuf library. Make sure you have the right version by running \"protoc --version\" after the install.\n\n wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz\n tar -xzvf protobuf-2.4.1.tar.gz\n cd protobuf-2.4.1/\n ./configure && make && sudo make install\n cd\n\nThis installs the npm package.\n\n npm install protobuf\n\nFor Ubuntu, update library paths.\n\n sudo ldconfig\n\nFor OSX, you might need to add the path:\n\n export DYLD_LIBRARY_PATH=/home/chris/node_modules/protobuf/build/Release:/usr/local/lib:$DYLD_LIBRARY_PATH\n\nAnd test that it works... Run node, try \n\n require('protobuf');\n\nyou should see: \n\n { Schema: [Function: Schema] }\n\n\nAs seen from the instructions above, this is my first attempt at packaging a slightly complex C++ module for NPM.\n\nIf you can help me simplify these instructions, please submit a patch.\n\n\nGood luck,\n\nChris.\n\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/chrisdew/protobuf/issues"
},
"_from": "protobuf@"
}
Kind regards,
Paul
... View more