0
votes

I'm trying to execute google cloud code lab by following the steps here.

I get an error when I run the command - npm start on the 4th codelab exercise.

Error details below:

/home/rohitj559/cloud-cardboard-viewer/node_modules/@google-cloud/debug-agent/src/agent/state.js:24 var ScopeType = require('vm').runInDebugContext('ScopeType'); ^ TypeError: require(...).runInDebugContext is not a function at Object. (/home/rohitj559/cloud-cardboard-viewer/node_modules/@google-cloud/debug-agent/src/agent/state.js:24:31) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/rohitj559/cloud-cardboard-viewer/node_modules/@google-cloud/debug-agent/src/agent/v8debugapi.js:24:27) at Module._compile (internal/modules/cjs/loader.js:689:30) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node server.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/rohitj559/.npm/_logs/2019-03-16T16_38_05_363Z-debug.log

What is this error exactly and how can I overcome this error?

I looked on the GitHub source file for issue log, couldn't find a solution.

1

1 Answers

1
votes

I have the same issue in this codelabs, and after a 'npm audit fix --force' the node serve is starting. Hope it's work for you.