question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm-conf breaking change: Path must be a string. Received undefined

See original GitHub issue

This is a Bug Report

Description

For bug reports:

  • What went wrong?

npm-conf version 1.1.1 causes the following message on deployment:

  Type Error ---------------------------------------------
  Path must be a string. Received undefined
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
  Stack Trace --------------------------------------------

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless
  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           8.2.1
     Serverless Version:     1.18.0
  • What did you expect should have happened?

Successful deploy.

Additional Data

  • Serverless Framework Version you’re using: 1.18.0
  • Operating System: Linux
  • Stack Trace:
TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.resolve (path.js:1167:7)
    at Conf.loadUser (/usr/local/lib/node_modules/serverless/node_modules/npm-conf/lib/conf.js:159:23)
    at module.exports.opts (/usr/local/lib/node_modules/serverless/node_modules/npm-conf/index.js:36:7)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/get-proxy/index.js:2:36)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/caw/index.js:3:18)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/download/index.js:5:13)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/lib/plugins/install/install.js:6:18)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at plugins.forEach (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:65:22)
    at Array.forEach (native)
    at PluginManager.loadPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:64:13)
    at PluginManager.loadCorePlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:77:10)
    at PluginManager.loadAllPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:59:10)
    at service.load.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:64:28)
    at <anonymous>
From previous event:
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at __dirname (/usr/local/lib/node_modules/serverless/bin/serverless:25:46)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:43:4)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

Downgrading npm-conf to 1.1.0 makes a successful deployment again.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kevvacommented, Jul 24, 2017

I’ve published 1.1.2, could you try again?

0reactions
HyperBraincommented, Jul 25, 2017

According to @dashmug 's comment (https://github.com/elastic-coders/serverless-webpack/issues/159#issuecomment-317630614) it did not appear with Serverless 1.17.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - TypeError: Path must be a string. Received undefined
I a persistent error while using serverless framework with serverless-offline and jest unit testing module.
Read more >
6 high severity vulnerabilities to address all issues ... - You.com
27 vulnerabilities (16 moderate, 9 high, 2 critical) To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit`...
Read more >
TypeError: Path must be a string. Received undefined - ionic-v3
Your environment has been set up for using Node.js 6.10.3 (ia32) and npm. C:\Users\petruccini>ionic start newapp blank TypeError: Path must be a ......
Read more >
@lerna/create | Yarn - Package Manager
BREAKING CHANGES. prompt: The ambiguous 'confirm', 'select', and 'input' exports have been removed. Please use the renamed exports 'promptConfirmation', ' ...
Read more >
nd-node-sass - npm Package Health Analysis - Snyk
file. Type: String Default: null Special: file or data must be specified. Path to a file for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found