GoogleCloudPlatform / functions-framework-nodejs

FaaS (Function as a service) framework for writing portable Node.js functions
Apache License 2.0
1.29k stars 160 forks source link

Runnining functions on Windows #562

Closed szwalkowski closed 11 months ago

szwalkowski commented 11 months ago
"W:\Program Files\nodejs\npm.cmd" run start

> @mycompany/func-api-social@0.0.1 start
> node --inspect node_modules/.bin/functions-framework --target=social --port 3004 | bunyan -o short --color

Debugger listening on ws://127.0.0.1:9229/625675ed-0518-45f2-bd9d-ded936f15292
For help, see: https://nodejs.org/en/docs/inspector
W:\workspace\mycompany\packages\func-api-social\node_modules\.bin\functions-framework:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1126:15)
    at Module._compile (node:internal/modules/cjs/loader:1162:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47

Process finished with exit code 0

I do have troubles running this as you can see. Worked perfectly under Linux but I need to start using Windows again. Is this compatible with Windows?

szwalkowski commented 11 months ago

Realised I can use simple 'functions-framework' Nvm ;)