Giter VIP home page Giter VIP logo

Comments (15)

aaronpowell avatar aaronpowell commented on June 2, 2024 7

Do you have any updates on node 20 for the CLI or the runtime @aaronpowell ? All our projects are using the current LTS version or Node, which is 20 and SWA is the only tooling that still doesn't support it.

The PR is up for review by the team, that's the extent of what I know

from static-web-apps-cli.

avalanchis avatar avalanchis commented on June 2, 2024 5

As a temporary workaround, I was able to edit the installed source on my workstation.

I found the file in this folder:
C:\Users\username\AppData\Roaming\npm\node_modules\@Azure\static-web-apps-cli\dist\core\func-core-tools.js

I edited the file to match the changes in the PR that @aaronpowell posted above: #786

Seems to be working for me.

from static-web-apps-cli.

itpropro avatar itpropro commented on June 2, 2024 4

Until Azure Functions support Node.js v20 isn't this a bit moot? They only just released v18 to public preview.

They released the public preview of Node 20 support on September 27th and they stated themselves that it is later than they wished, but the GA process is a little bit tedious and they plan to release into GA the latest March 2024.
But as azure-functions-core-tools and the whole tooling already supports Node 20, it should definitely be supported by static-web-apps-cli and the Static Web Apps Azure Service.
Node 20 is the current LTS and Node 18 is already in maintenance since October and people started to migrate away from it.

from static-web-apps-cli.

jcpachkoski avatar jcpachkoski commented on June 2, 2024 4

I've been trying the same. I have node.js v20.11.0. I was hoping this was fixed by now.
Found Azure Functions Core Tools v4 which is incompatible with your current Node.js v20.11.0.

from static-web-apps-cli.

josephboyd9 avatar josephboyd9 commented on June 2, 2024 4

Any update on this yet? Azure Functions have now been updated to support Node.js v20, but swa still doesn't allow them to work together.

from static-web-apps-cli.

johnnyreilly avatar johnnyreilly commented on June 2, 2024 2

If you're using yarn you can hack using a newer version of @azure/msal-node that is Node.js v20 compatible using a resolutions entry in your package.json:

  "resolutions": {
    "**/@azure/msal-node": "2.3.0"
  },

However it looks like Node.js 20 isn't generally supported anyway

✖ Found Azure Functions Core Tools v4 which is incompatible with your current Node.js v20.8.1.
✖ See https://aka.ms/functions-node-versions for more information.

from static-web-apps-cli.

johnnyreilly avatar johnnyreilly commented on June 2, 2024 1

There is a different issue when running with Node.js 20. The @azure/identity dependency in turn depends upon "@azure/msal-node" "^1.17.3" which triggers the following message on install:

error @azure/[email protected]: The engine "node" is incompatible with this module. Expected version "10 || 12 || 14 || 16 || 18". Got "20.8.1"
error Found incompatible module.

from static-web-apps-cli.

johnnyreilly avatar johnnyreilly commented on June 2, 2024 1

There's some discussion on this PR around Node.js 20 support - linking in case it becomes useful.

#758 (comment)

from static-web-apps-cli.

jhelmink avatar jhelmink commented on June 2, 2024

Until Azure Functions support Node.js v20 isn't this a bit moot? They only just released v18 to public preview.

from static-web-apps-cli.

bzbetty avatar bzbetty commented on June 2, 2024

For those of us that use .NET as our functions backend I'm not sure why we even get this error? Is there a way to disable this check?

from static-web-apps-cli.

aaronpowell avatar aaronpowell commented on June 2, 2024

For those of us that use .NET as our functions backend I'm not sure why we even get this error? Is there a way to disable this check?

The reason that you get this error with .NET Functions is the CLI tool used to start Azure Functions (azure-functions-core-tools) is a node package.

from static-web-apps-cli.

aaronpowell avatar aaronpowell commented on June 2, 2024

I've opened a PR, #786, which should fix this.

from static-web-apps-cli.

itpropro avatar itpropro commented on June 2, 2024

Do you have any updates on node 20 for the CLI or the runtime @aaronpowell ? All our projects are using the current LTS version or Node, which is 20 and SWA is the only tooling that still doesn't support it.

from static-web-apps-cli.

chrisred avatar chrisred commented on June 2, 2024

I would like this fixed too. Did as @avalanchis suggested and it works fine.

from static-web-apps-cli.

donniefitz2 avatar donniefitz2 commented on June 2, 2024

Any updates on this?

from static-web-apps-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.