datacamp-light icon indicating copy to clipboard operation
datacamp-light copied to clipboard

Unable to start local test server

Open linted opened this issue 6 years ago • 2 comments

I am trying to start up a local development server, but I keep getting errors from npm when following the install steps.

$ npm -i
Error: Failed to replace env in config: ${NPM_TOKEN}
    at /usr/lib/node_modules/npm/lib/config/core.js:415:13
    at String.replace (<anonymous>)
    at envReplace (/usr/lib/node_modules/npm/lib/config/core.js:411:12)
    at parseField (/usr/lib/node_modules/npm/lib/config/core.js:389:7)
    at /usr/lib/node_modules/npm/lib/config/core.js:330:24
    at Array.forEach (<anonymous>)
    at Conf.add (/usr/lib/node_modules/npm/lib/config/core.js:328:23)
    at ConfigChain.addString (/usr/lib/node_modules/npm/node_modules/config-chain/index.js:244:8)
    at Conf.<anonymous> (/usr/lib/node_modules/npm/lib/config/core.js:316:10)
    at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
/usr/lib/node_modules/npm/lib/npm.js:61
      throw new Error('npm.load() required')
      ^

Error: npm.load() required
    at Object.get (/usr/lib/node_modules/npm/lib/npm.js:61:13)
    at process.errorHandler (/usr/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at process.emit (events.js:182:13)
    at process._fatalException (internal/bootstrap/node.js:628:27)

I am running a brand new debian 9.5 fully updated, with node v11.1.0, and npm v6.4.1 After looking at google results, it looks like it might be that I am using a new and unsupported version of node. If that is true, should work be done to update to the latest version?

linted avatar Nov 10 '18 01:11 linted

Fixed this by export NPM_TOKEN=xyz before running npm i. however I am now running into other problems during the install

linted avatar Nov 10 '18 03:11 linted

I finally got it to work. The version of npm on debian is too old to work with this it seems. My final solution was to use Ubuntu 18.04 and register an account on npmjs.com to get a real token.

linted avatar Dec 08 '18 18:12 linted