You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.
Request from ::ffff:127.0.0.1: POST /.netlify/functions/error-test
{"level":"error","message":"End - Error:"}
{"errorMessage":"The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined","errorType":"TypeError","level":"error","stackTrace":["createRequire (internal/modules/cjs/loader.js:1186:11)","Object.<anonymous> (myproject/node_modules/netlify/src/open_api.js:5:17)","Module._compile (internal/modules/cjs/loader.js:1085:14)","Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)","Module.load (internal/modules/cjs/loader.js:950:32)","Function.Module._load (internal/modules/cjs/loader.js:790:14)","Module.require (internal/modules/cjs/loader.js:974:19)","require (internal/modules/cjs/helpers.js:92:18)","Object.<anonymous> (myproject/.netlify/functions-serve/error-test/error-test.js:1:18)","Module._compile (internal/modules/cjs/loader.js:1085:14)"]}
With the invoke call stack trace:
TypeError: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
createRequire (internal/modules/cjs/loader.js:1186:11)
Object.<anonymous> (myproject/node_modules/netlify/src/open_api.js:5:17)
Module._compile (internal/modules/cjs/loader.js:1085:14)
Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
Module.load (internal/modules/cjs/loader.js:950:32)
Function.Module._load (internal/modules/cjs/loader.js:790:14)
Module.require (internal/modules/cjs/loader.js:974:19)
require (internal/modules/cjs/helpers.js:92:18)
Object.<anonymous> (myproject/.netlify/functions-serve/error-test/error-test.js:1:18)
Module._compile (internal/modules/cjs/loader.js:1085:14)
- What is the expected behavior?
It doesn't blow up when you instantiate it.
I'd like to be able to use this client for the sake of convenience, but will revert to using standard fetch with a few headers to access the Netlify API since this doesn't seem usable at all.
- Please mention your node.js, and operating system version.
- Do you want to request a feature or report a bug?
Bug
- What is the current behavior?
When invoking a function locally using
netlify functions:invoke
, a type error is thrown when instantiating this client usingnew NetlifyAPI(token)
- If the current behavior is a bug, please provide the steps to reproduce.
Create and invoke a simple test function, in which the client is instantiated using a valid token:
The server throws an error:
With the invoke call stack trace:
- What is the expected behavior?
It doesn't blow up when you instantiate it.
I'd like to be able to use this client for the sake of convenience, but will revert to using standard
fetch
with a few headers to access the Netlify API since this doesn't seem usable at all.- Please mention your node.js, and operating system version.
Using:
"netlify": "^11.0.1",
"@netlify/functions": "^1.0.0",
"netlify-cli": "^9.16.6",
Node v14.17.1
Windows 10 + WSL2
The text was updated successfully, but these errors were encountered: