Check the version of Node you're running. `vm.runInDebugContext()` was [deprecated as of Node v8.0.0]( https://nodejs.org/docs/latest-v9.x/api/vm.html#vm_vm_runindebugcontext_code) and removed in Node 10. It's possible there's a newer version of that Angular tutorial, or maybe you just need to install nvm and run the demo with Node v6 or v8.
On Sat, Mar 16, 2019 at 10:23 AM rohit jagannath <rohitj...@gmail.com> wrote: > I am trying to execute google cloud code lab by following the steps below > - > https://codelabs.developers.google.com/codelabs/cloud-cardboard-viewer/index.html#3 > > 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.<anonymous> (/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.<anonymous> (/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! cloud-cardboard-viewer@0.1.0 start: `node server.js` > > npm ERR! Exit status 1 > > npm ERR! > > npm ERR! Failed at the cloud-cardboard-viewer@0.1.0 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. > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation-policy-md > Old group rules: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nodejs+unsubscr...@googlegroups.com. > To post to this group, send email to nodejs@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nodejs/ab632e6f-bf7f-45c3-9e34-d1e9ba5ec01e%40googlegroups.com > <https://groups.google.com/d/msgid/nodejs/ab632e6f-bf7f-45c3-9e34-d1e9ba5ec01e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAHG3qKqf-_fTiB-kYhY1ADU%2Bj91wLkN%3DL-ft%3DPZG1rdGibnXCA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.