cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Appdynamics-Protobuff dependency fails due to invalid tag name

Paul.Krohmer
Wanderer

Hi,

 

running a Node application with AppDynamics dependencies leads to the following error message:

 

2018-06-06T14:45:50.78+0200 [STG/0]      OUT        Installing any new modules (package.json)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at invalidTagName (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:85:15)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at fromRegistry (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:272:13)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at Function.resolve (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:75:12)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at versionMatch (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install/deps.js:666:12)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at Array.filter (<anonymous>)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at exports.findRequirement (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install/deps.js:676:23)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at tree.children.filter.forEach (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install/deps.js:125:70)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT npm ERR!     /home/vcap/.npm/_logs/2018-06-06T12_45_52_165Z-debug.log
2018-06-06T14:45:52.16+0200 [STG/0]      OUT Unhandled rejection Error: Invalid tag name "protobuf@": Tags may not have any characters that encodeURIComponent encodes.
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at doesChildVersionMatch (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install/deps.js:68:25)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at exports.findRequirement (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install/deps.js:684:10)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at findChild (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install/deps.js:102:17)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at computeMetadata (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install/deps.js:113:9)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at Array.forEach (<anonymous>)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at computeMetadata (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install/deps.js:125:51)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at Installer.normalizeCurrentTree (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/lib/install.js:400:3)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at Array.<anonymous> (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT     at LOOP (/tmp/contents113835981/deps/0/node/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
2018-06-06T14:45:52.16+0200 [STG/0]      OUT npm ERR! cb() never called!
2018-06-06T14:45:52.16+0200 [STG/0]      OUT npm ERR! This is an error with npm itself. Please report this error at:
2018-06-06T14:45:52.16+0200 [STG/0]      OUT npm ERR!     <https://github.com/npm/npm/issues>
2018-06-06T14:45:52.16+0200 [STG/0]      OUT npm ERR! A complete log of this run can be found in:
2018-06-06T14:45:52.17+0200 [STG/0]      OUT        **ERROR** Unable to build dependencies: exit status 1
2018-06-06T14:45:52.17+0200 [STG/0]      ERR Failed to compile droplet: Failed to run all supply scripts: exit status 14
2018-06-06T14:45:52.19+0200 [STG/0]      OUT Exit status 223
2018-06-06T14:45:52.19+0200 [STG/0]      ERR Staging failed: STG: Exited with status 223
2018-06-06T14:45:52.20+0200 [STG/0]      OUT Stopping instance f4974668-817e-43d3-b5ed-c92c36471c1f
2018-06-06T14:45:52.20+0200 [STG/0]      OUT Destroying container
2018-06-06T14:45:53.07+0200 [STG/0]      OUT Successfully destroyed container

It is a private PCF Cloud without any internet access. There is no way to change anything about this. The Node application is prebuilded on a CI Server and the result is uploaded to the cloud.

 

Thanks in advance!

Kind regards,

Paul

7 REPLIES 7

Kyle.Furlong
AppDynamics Team (Retired)

Hi Paul,

 

I'm a bit confused. You mention the app is built on a CI server, but the log messages are npm install trying to build the packages. Is the log from the CI server or from the PCF instance?

 

Also, I'm noting that this particular error message could be related to the new integrity check that's part of npm 5 and later. Since AppDynamics has native dependencies, it can fail this integrity check for the same version, if that version was built on a different environment than the target machine.

 

The usual way to resolve this is to set the npm config set user-agent "<user-agent>" setting to match between the target machine and the build server.

 

Regards,

Kyle

Thanks,
Kyle Furlong, Technical Lead (C++ and Dynamic Languages)




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

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 

Kyle.Furlong
AppDynamics Team (Retired)

Hi Paul,

 

Could you provide the full PCF build log as well as your buildpack version? I believe what's happening is that you have a package-lock.json file that the PCF build is trying to validate, and it is choking on this _from tag when it doesn't find the network dependency.

 

I did some research, and it looks like not only our package is affected by this bug: https://github.com/npm/npm/issues/16981. In the OP, they mention the _from tag contains jspm-nodelibs-util@^0.2.0, somewhat of a validation that our _from tags aren't totally off base. Also within the npm test harness one of the checks for _from has this regex: new RegExp(`${mod}@.*`), so likely valid in that case. Anyways, please check that thread for possible workarounds as well.

 

In the mean time I will recommend that our devs remove the _from tags completely, as I don't believe they're doing anything useful right now.

 

Regards,

Kyle

Thanks,
Kyle Furlong, Technical Lead (C++ and Dynamic Languages)




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Hi,

thank you very much for your reply!

Below (next post due to character limit) is the whole log after I tried to start the application. The buildpack version is 1.6.15.

According to https://github.com/cloudfoundry/nodejs-buildpack/tree/v1.6.15 this buildpack uses the NodeJS Version 8.9.4. But the log states that it is using a 9.x.x version. Maybe that is the issue. Assuming they didn't change anything in this  8.x.x version is using NPM with the Version 5.6.0.

So what we are doing when we are building this in jenkins is the following: 

 

npm config set user-agent 'npm/5.6.0 node/v8.9.4 linux x64'
rm -rf node_modules/
yarn install (also tried npm install, we are using yarn cause npm had no offline caching in the past)

 

I also found the the Github issue you mentioned. To my understanding this issue should have long been fixed in the NPM version we are using. I also tried out the workarounds (removing the the package-lock.json). Unfornutately none of them worked for me. Nevertheless I appreciate your support and will try again. Maybe I just did something wrong!

I'm also happy when a new version will be released.

 

Kind regards,

Paul

 

PCF Log when Starting application: 

2018-06-08T14:41:08.33+0200 [API/1]      OUT Updated app with guid 9c68fac3-ec6d-41bb-810e-6dfda2d70d3e ({"state"=>"STARTED"})
2018-06-08T14:41:08.36+0200 [STG/0]      OUT Downloading nodejs_buildpack...
2018-06-08T14:41:08.37+0200 [STG/0]      OUT Downloaded nodejs_buildpack
2018-06-08T14:41:08.37+0200 [STG/0]      OUT Creating container
2018-06-08T14:41:08.68+0200 [STG/0]      OUT Successfully created container
2018-06-08T14:41:08.68+0200 [STG/0]      OUT Downloading app package...
2018-06-08T14:41:15.29+0200 [STG/0]      OUT Downloaded app package (101.9M)
2018-06-08T14:41:15.29+0200 [STG/0]      OUT Staging...
2018-06-08T14:41:15.39+0200 [STG/0]      OUT -----> Nodejs Buildpack version 1.6.15
2018-06-08T14:41:15.39+0200 [STG/0]      OUT -----> Installing binaries
2018-06-08T14:41:15.39+0200 [STG/0]      OUT        engines.node (package.json): >=8.x.x
2018-06-08T14:41:15.39+0200 [STG/0]      OUT        engines.npm (package.json): 5.6.0
2018-06-08T14:41:15.39+0200 [STG/0]      OUT        **WARNING** Dangerous semver range (>) in engines.node. See: http://docs.cloudfoundry.org/buildpacks/node/node-tips.html
2018-06-08T14:41:15.39+0200 [STG/0]      OUT -----> Installing node 9.4.0
2018-06-08T14:41:15.39+0200 [STG/0]      OUT        Copy [/tmp/buildpacks/34d3a9bb9853cc2fb86e78f8f1397dd6/dependencies/6a832c094f27de73ce5c74ba89afde5e/node-9.4.0-linux-x64-062d906c.tgz]
2018-06-08T14:41:15.55+0200 [STG/0]      OUT        **WARNING** node 9.x will no longer be available in new buildpacks released after 2018-06-30.
2018-06-08T14:41:15.55+0200 [STG/0]      OUT        See: https://github.com/nodejs/LTS
2018-06-08T14:41:17.67+0200 [STG/0]      OUT        npm 5.6.0 already installed with node
2018-06-08T14:41:17.67+0200 [STG/0]      OUT -----> Installing yarn 1.2.1
2018-06-08T14:41:17.67+0200 [STG/0]      OUT        Copy [/tmp/buildpacks/34d3a9bb9853cc2fb86e78f8f1397dd6/dependencies/614d352cc928df75216af09d3a3807d0/yarn-v1.2.1-a16106e2.tar.gz]
2018-06-08T14:41:18.17+0200 [STG/0]      OUT        Installed yarn 1.2.1
2018-06-08T14:41:18.17+0200 [STG/0]      OUT -----> Creating runtime environment
2018-06-08T14:41:18.18+0200 [STG/0]      OUT        NODE_ENV=production
2018-06-08T14:41:18.18+0200 [STG/0]      OUT        NODE_HOME=/tmp/contents087338230/deps/0/node
2018-06-08T14:41:18.18+0200 [STG/0]      OUT        NODE_MODULES_CACHE=true
2018-06-08T14:41:18.18+0200 [STG/0]      OUT        NODE_VERBOSE=false
2018-06-08T14:41:18.18+0200 [STG/0]      OUT        NPM_CONFIG_LOGLEVEL=error
2018-06-08T14:41:18.18+0200 [STG/0]      OUT        NPM_CONFIG_PRODUCTION=true
2018-06-08T14:41:18.89+0200 [STG/0]      OUT -----> Restoring cache
2018-06-08T14:41:18.89+0200 [STG/0]      OUT        Skipping cache restore (no previous cache)
2018-06-08T14:41:18.89+0200 [STG/0]      OUT -----> Building dependencies
2018-06-08T14:41:18.89+0200 [STG/0]      OUT        Prebuild detected (node_modules already exists)
2018-06-08T14:41:18.89+0200 [STG/0]      OUT        Rebuilding any native modules
2018-06-08T14:41:21.03+0200 [STG/0]      OUT appdynamics@4.4.9 /tmp/app/node_modules/appdynamics
2018-06-08T14:41:21.03+0200 [STG/0]      OUT log4js@0.6.38 /tmp/app/node_modules/log4js
2018-06-08T14:41:21.03+0200 [STG/0]      OUT readable-stream@1.0.34 /tmp/app/node_modules/log4js/node_modules/readable-stream
2018-06-08T14:41:21.03+0200 [STG/0]      OUT core-util-is@1.0.2 /tmp/app/node_modules/core-util-is
2018-06-08T14:41:21.03+0200 [STG/0]      OUT isarray@0.0.1 /tmp/app/node_modules/isarray
2018-06-08T14:41:21.03+0200 [STG/0]      OUT string_decoder@0.10.31 /tmp/app/node_modules/string_decoder
2018-06-08T14:41:21.03+0200 [STG/0]      OUT inherits@2.0.3 /tmp/app/node_modules/inherits
2018-06-08T14:41:21.03+0200 [STG/0]      OUT semver@4.3.6 /tmp/app/node_modules/log4js/node_modules/semver
2018-06-08T14:41:21.03+0200 [STG/0]      OUT set-immediate@0.1.1 /tmp/app/node_modules/set-immediate
2018-06-08T14:41:21.03+0200 [STG/0]      OUT uuid@3.1.0 /tmp/app/node_modules/uuid
2018-06-08T14:41:21.03+0200 [STG/0]      OUT appdynamics-jre@4.4.9 /tmp/app/node_modules/appdynamics-jre
2018-06-08T14:41:21.03+0200 [STG/0]      OUT appdynamics-proxy@4.4.9 /tmp/app/node_modules/appdynamics-proxy
2018-06-08T14:41:21.03+0200 [STG/0]      OUT appdynamics-libagent@4.4.9 /tmp/app/node_modules/appdynamics-libagent
2018-06-08T14:41:21.03+0200 [STG/0]      OUT appdynamics-native@4.4.9 /tmp/app/node_modules/appdynamics-native
2018-06-08T14:41:21.03+0200 [STG/0]      OUT appdynamics-protobuf@4.4.9 /tmp/app/node_modules/appdynamics-protobuf
2018-06-08T14:41:21.03+0200 [STG/0]      OUT appdynamics-zmq@4.4.9 /tmp/app/node_modules/appdynamics-zmq
2018-06-08T14:41:21.03+0200 [STG/0]      OUT request@2.83.0 /tmp/app/node_modules/appdynamics/node_modules/request
2018-06-08T14:41:21.03+0200 [STG/0]      OUT aws-sign2@0.7.0 /tmp/app/node_modules/appdynamics/node_modules/aws-sign2
2018-06-08T14:41:21.03+0200 [STG/0]      OUT aws4@1.7.0 /tmp/app/node_modules/appdynamics/node_modules/aws4
2018-06-08T14:41:21.03+0200 [STG/0]      OUT caseless@0.12.0 /tmp/app/node_modules/caseless
2018-06-08T14:41:21.03+0200 [STG/0]      OUT combined-stream@1.0.5 /tmp/app/node_modules/combined-stream
2018-06-08T14:41:21.03+0200 [STG/0]      OUT delayed-stream@1.0.0 /tmp/app/node_modules/delayed-stream
2018-06-08T14:41:21.03+0200 [STG/0]      OUT extend@3.0.1 /tmp/app/node_modules/appdynamics/node_modules/extend
2018-06-08T14:41:21.03+0200 [STG/0]      OUT forever-agent@0.6.1 /tmp/app/node_modules/forever-agent
2018-06-08T14:41:21.03+0200 [STG/0]      OUT form-data@2.3.2 /tmp/app/node_modules/appdynamics/node_modules/form-data
2018-06-08T14:41:21.03+0200 [STG/0]      OUT asynckit@0.4.0 /tmp/app/node_modules/asynckit
2018-06-08T14:41:21.03+0200 [STG/0]      OUT combined-stream@1.0.6 /tmp/app/node_modules/appdynamics/node_modules/form-data/node_modules/combined-stream
2018-06-08T14:41:21.03+0200 [STG/0]      OUT mime-types@2.1.15 /tmp/app/node_modules/appdynamics/node_modules/form-data/node_modules/mime-types



--several logs removed due to character limit exceeding---

2018-06-08T14:41:21.04+0200 [STG/0]      OUT ws@1.1.2 /tmp/app/node_modules/engine.io-client/node_modules/ws
2018-06-08T14:41:21.04+0200 [STG/0]      OUT xmlhttprequest-ssl@1.5.3 /tmp/app/node_modules/xmlhttprequest-ssl
2018-06-08T14:41:21.04+0200 [STG/0]      OUT yeast@0.1.2 /tmp/app/node_modules/yeast
2018-06-08T14:41:21.04+0200 [STG/0]      OUT object-component@0.0.3 /tmp/app/node_modules/object-component
2018-06-08T14:41:21.04+0200 [STG/0]      OUT to-array@0.1.4 /tmp/app/node_modules/to-array
2018-06-08T14:41:21.04+0200 [STG/0]      OUT sockjs-client@1.1.4 /tmp/app/node_modules/sockjs-client
2018-06-08T14:41:21.04+0200 [STG/0]      OUT debug@2.6.7 /tmp/app/node_modules/sockjs-client/node_modules/debug
2018-06-08T14:41:21.04+0200 [STG/0]      OUT eventsource@0.1.6 /tmp/app/node_modules/eventsource
2018-06-08T14:41:21.04+0200 [STG/0]      OUT original@1.0.0 /tmp/app/node_modules/original
2018-06-08T14:41:21.04+0200 [STG/0]      OUT url-parse@1.0.5 /tmp/app/node_modules/original/node_modules/url-parse
2018-06-08T14:41:21.04+0200 [STG/0]      OUT querystringify@0.0.4 /tmp/app/node_modules/original/node_modules/querystringify
2018-06-08T14:41:21.04+0200 [STG/0]      OUT requires-port@1.0.0 /tmp/app/node_modules/requires-port
2018-06-08T14:41:21.04+0200 [STG/0]      OUT faye-websocket@0.11.1 /tmp/app/node_modules/faye-websocket
2018-06-08T14:41:21.04+0200 [STG/0]      OUT websocket-driver@0.6.5 /tmp/app/node_modules/websocket-driver
2018-06-08T14:41:21.04+0200 [STG/0]      OUT websocket-extensions@0.1.1 /tmp/app/node_modules/websocket-extensions
2018-06-08T14:41:21.04+0200 [STG/0]      OUT url-parse@1.1.9 /tmp/app/node_modules/url-parse
2018-06-08T14:41:21.04+0200 [STG/0]      OUT querystringify@1.0.0 /tmp/app/node_modules/querystringify
2018-06-08T14:41:21.04+0200 [STG/0]      OUT source-map-support@0.4.15 /tmp/app/node_modules/source-map-support
2018-06-08T14:41:21.04+0200 [STG/0]      OUT source-map@0.5.6 /tmp/app/node_modules/source-map
2018-06-08T14:41:21.04+0200 [STG/0]      OUT tslib@1.7.1 /tmp/app/node_modules/tslib
2018-06-08T14:41:21.04+0200 [STG/0]      OUT uuid-1345@0.99.6 /tmp/app/node_modules/uuid-1345
2018-06-08T14:41:21.04+0200 [STG/0]      OUT macaddress@0.2.8 /tmp/app/node_modules/macaddress
2018-06-08T14:41:21.04+0200 [STG/0]      OUT winston@2.3.1 /tmp/app/node_modules/winston
2018-06-08T14:41:21.04+0200 [STG/0]      OUT async@1.0.0 /tmp/app/node_modules/async
2018-06-08T14:41:21.04+0200 [STG/0]      OUT colors@1.0.3 /tmp/app/node_modules/winston/node_modules/colors
2018-06-08T14:41:21.04+0200 [STG/0]      OUT cycle@1.0.3 /tmp/app/node_modules/cycle
2018-06-08T14:41:21.04+0200 [STG/0]      OUT eyes@0.1.8 /tmp/app/node_modules/eyes
2018-06-08T14:41:21.04+0200 [STG/0]      OUT stack-trace@0.0.9 /tmp/app/node_modules/stack-trace
2018-06-08T14:41:21.04+0200 [STG/0]      OUT zone.js@0.8.16 /tmp/app/node_modules/zone.js
2018-06-08T14:41:21.04+0200 [STG/0]      OUT bcrypt-pbkdf@1.0.0 /tmp/app/node_modules/bcrypt-pbkdf
2018-06-08T14:41:21.04+0200 [STG/0]      OUT tweetnacl@0.14.5 /tmp/app/node_modules/tweetnacl
2018-06-08T14:41:21.04+0200 [STG/0]      OUT ecc-jsbn@0.1.1 /tmp/app/node_modules/ecc-jsbn
2018-06-08T14:41:21.04+0200 [STG/0]      OUT jsbn@0.1.0 /tmp/app/node_modules/jsbn
2018-06-08T14:41:21.04+0200 [STG/0]      OUT jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
2018-06-08T14:41:21.04+0200 [STG/0]      OUT n@2.1.11 /tmp/app/node_modules/n
2018-06-08T14:41:21.04+0200 [STG/0]      OUT        Installing any new modules (package.json)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT Unhandled rejection Error: Invalid tag name "protobuf@": Tags may not have any characters that encodeURIComponent encodes.
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at invalidTagName (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:85:15)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at fromRegistry (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:272:13)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at Function.resolve (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:75:12)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at doesChildVersionMatch (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install/deps.js:68:25)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at versionMatch (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install/deps.js:666:12)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at Array.filter (<anonymous>)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at exports.findRequirement (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install/deps.js:676:23)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at exports.findRequirement (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install/deps.js:684:10)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at findChild (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install/deps.js:102:17)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at computeMetadata (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install/deps.js:113:9)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at tree.children.filter.forEach (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install/deps.js:125:70)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at Array.forEach (<anonymous>)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at computeMetadata (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install/deps.js:125:51)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at Installer.normalizeCurrentTree (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/lib/install.js:400:3)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at Array.<anonymous> (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
2018-06-08T14:41:22.47+0200 [STG/0]      OUT     at LOOP (/tmp/contents087338230/deps/0/node/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
2018-06-08T14:41:22.48+0200 [STG/0]      OUT npm ERR! cb() never called!
2018-06-08T14:41:22.48+0200 [STG/0]      OUT npm ERR! This is an error with npm itself. Please report this error at:
2018-06-08T14:41:22.48+0200 [STG/0]      OUT npm ERR!     <https://github.com/npm/npm/issues>
2018-06-08T14:41:22.48+0200 [STG/0]      OUT npm ERR! A complete log of this run can be found in:
2018-06-08T14:41:22.48+0200 [STG/0]      OUT npm ERR!     /home/vcap/.npm/_logs/2018-06-08T12_41_22_482Z-debug.log
2018-06-08T14:41:22.49+0200 [STG/0]      OUT        **ERROR** Unable to build dependencies: exit status 1
2018-06-08T14:41:22.49+0200 [STG/0]      ERR Failed to compile droplet: Failed to run all supply scripts: exit status 14
2018-06-08T14:41:22.51+0200 [STG/0]      OUT Exit status 223
2018-06-08T14:41:22.51+0200 [STG/0]      ERR Staging failed: STG: Exited with status 223
2018-06-08T14:41:22.51+0200 [STG/0]      OUT Stopping instance 1c94e5cf-e13c-4644-8a30-c9d7b74c1996
2018-06-08T14:41:22.51+0200 [STG/0]      OUT Destroying container
2018-06-08T14:41:23.44+0200 [STG/0]      OUT Successfully destroyed container
    

 

Kyle.Furlong
AppDynamics Team (Retired)

Hey Paul,

 

Thanks for all the good details. I've inspected the buildpack code and it looks like what's happening is that it always runs both npm rebuild and npm install even though you already provide a complete node_modules directory. Given your deployment style, I would recommend forking the buildpack and either removing these npm calls or putting them behind a flag.

 

Regards,

Kyle

Thanks,
Kyle Furlong, Technical Lead (C++ and Dynamic Languages)




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Hi! 

Sorry for answering so late. Thank you very much for your effort! 

I wasn't aware of the fact that the rebuild is always triggered and this is very valuable information.
However I'm afraid that forking the buildpack is not a viable solution for us since we don't even have control over which buildpacks are running on the machines. We can however influence it. :)

 

Nevertheless I will mark you answer as solution as this together with prebuilding the modules will surely make AppDynamics run in offline enviornments.

 

Have a great day!