Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

The "path" argument must be of type string. Received undefined #12

Open
DineshChacko opened this issue Apr 5, 2022 · 2 comments
Open

Comments

@DineshChacko
Copy link

I followed the quickstart guide - https://www.serverless.com/framework/docs/providers/knative/guide/quick-start
node - v16.14.2
serverless version:
Framework Core: 3.10.2
Plugin: 6.2.1
SDK: 4.3.2

I was able to setup knative successfully on AKS Cluster.
Creating new service from template was successful but deploy failed:

serverless deploy
Environment: win32, node 16.14.2, framework 3.10.2, plugin 6.2.1, SDK 4.3.2
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues

Error:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:120:11)
at Object.join (node:path:429:7)
at Object. (C:\my-service\node_modules@serverless\kubernetes-namespace\serverless.js:7:24)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\my-service\node_modules\serverless-knative\deploy\lib\ensureNamespace.js:4:29)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\my-service\node_modules\serverless-knative\deploy\knativeDeploy.js:4:25)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\my-service\node_modules\serverless-knative\index.js:5:23)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at module.exports (C:\Users\dines\AppData\Roaming\npm\node_modules\serverless\lib\utils\import-module.js:5:12)
at PluginManager.requireServicePlugin (C:\Users\dines\AppData\Roaming\npm\node_modules\serverless\lib\classes\plugin-manager.js:171:14)
at PluginManager.resolveServicePlugins (C:\Users\dines\AppData\Roaming\npm\node_modules\serverless\lib\classes\plugin-manager.js:198:29)
at PluginManager.loadAllPlugins (C:\Users\dines\AppData\Roaming\npm\node_modules\serverless\lib\classes\plugin-manager.js:136:47)
at Serverless.init (C:\Users\dines\AppData\Roaming\npm\node_modules\serverless\lib\serverless.js:141:30)
at async C:\Users\dines\AppData\Roaming\npm\node_modules\serverless\scripts\serverless.js:572:7

@DineshChacko
Copy link
Author

npm info react-scripts version
5.0.0

@riverar
Copy link

riverar commented Mar 23, 2023

This is due to the serverless kubernetes package on npm looking for the user's home directory via process.env.HOME instead of something more portable. A quick workaround is to set the HOME variable to the value in USERPROFILE.

But beware this plugin is not in good shape. (I haven't gotten it working yet.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants