appmetrics icon indicating copy to clipboard operation
appmetrics copied to clipboard

Break application while enable trace

Open xiaoshimimi opened this issue 7 years ago • 1 comments

Application: git clone [email protected]:regularjs/spa-example.git Install Application:

npm install -g cnpm
cnpm install
cnpm install appmetrics
npm run build

add the following lines:

var appmetrics = require('appmetrics');
appmetrics.enable('trace');

then run: npm start

Application is broken here:

[yuecchen@oc1832043351 spa-example]$ npm start

> [email protected] start /home/yuecchen/Documents/Github/spa/spa-example
> node app/server/app.js

[Fri Nov  2 15:53:52 2018] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 4.0.0.201805080641 (Agent Core 3.2.6)
assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: app.use() requires a generator function
    at Application.app.use (/home/yuecchen/Documents/Github/spa/spa-example/node_modules/[email protected]@koa/lib/application.js:106:5)
    at Object.<anonymous> (/home/yuecchen/Documents/Github/spa/spa-example/app/server/app.js:37:5)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app/server/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/yuecchen/.npm/_logs/2018-11-02T07_53_53_768Z-debug.log

xiaoshimimi avatar Nov 02 '18 07:11 xiaoshimimi

@yuecchen

yuecchen avatar Nov 02 '18 08:11 yuecchen