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
Are you accessing the CLI from the default port :4280 ?
No, I am using a different port number (--port) and accessing the CLI from that port
Yes, I am accessing the CLI from port :4280
Make sure you are accessing the URL printed in the console when running swa start!
Describe the bug
I'm using the SWA as a part of a Teams Toolkit workflow. When I try to deploy the associated SWA, the workflow fails because of the failed imports.
The console lists an issue with the keyword 'with', which is weird considering my machines are running Node versions compatible with this keyword.
Tried to rollback my app to yesterday's deployed version, no luck there.
The error lists the following:
file:///opt/homebrew/lib/node_modules/@azure/static-web-apps-cli/dist/cli/index.js:22
import pkg from "../../package.json" with { type: "json" };
^^^^
SyntaxError: Unexpected token 'with'
at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:119:18)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:468:14)
(the same error appears even after checking the version with swa --version)
To Reproduce
Steps to reproduce the behavior:
Go to Teams Toolkit
Sign in to respective accounts
Click on Deploy
Choose ENV
Confirm
Wait for the build and let the yml workflow use swa deploy ./build -d ${{SECRET_TAB_SWA_DEPLOYMENT_TOKEN}} --env production (--verbose=silly makes no difference)
See error
Expected behavior
The application to be deployed to Azure and the workflow to continue.
I am having the same issue this morning with CLI version 2.0.0.
Upgrading to Node LTS v20.16.0 fixes the issue but I get a warning like so:
(node:7024) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Unfortunately, local authentication is broken for me in 2.0.0 (windows 11, node 20.16.0), rolling back to 1.1.10 for now....
Are you accessing the CLI from the default port
:4280
?--port
) and accessing the CLI from that port:4280
Describe the bug
I'm using the SWA as a part of a Teams Toolkit workflow. When I try to deploy the associated SWA, the workflow fails because of the failed imports.
The console lists an issue with the keyword 'with', which is weird considering my machines are running Node versions compatible with this keyword.
Tried to rollback my app to yesterday's deployed version, no luck there.
The error lists the following:
(the same error appears even after checking the version with
swa --version
)To Reproduce
Steps to reproduce the behavior:
swa deploy ./build -d ${{SECRET_TAB_SWA_DEPLOYMENT_TOKEN}} --env production
(--verbose=silly
makes no difference)Expected behavior
The application to be deployed to Azure and the workflow to continue.
Desktop:
OS: macOS
Version: Sonoma 14.5 (23F79), Node 18.17.1, 20.8.1
OS: Windows
Version: 11 23H2 (22631.3880), Node 16.13.0
Additional context
Steps taken to try to fix the issue:
with
byassert
, same errorThe text was updated successfully, but these errors were encountered: