Closed zsoltbalint closed 1 year ago
hi @zsoltbalint could you paste the output of SHOPIFY_CLI_STACKTRACE=1 npm run dev -- --verbose
(this is the way to pass options to a npm script)
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
I have the same issue.
@asmerkin we seem to have lost @zsoltbalint, perhaps you can follow @Arkham's instructions?
It didn't like it.
Run SHOPIFY_CLI_STACKTRACE=1 npm run shopify app deploy -- --verbose
SHOPIFY_CLI_STACKTRACE=1: /home/runner/work/_temp/9201a291-a3ee-4c76-8721-26112f4fa0a0.ps1:2
Line |
2 | SHOPIFY_CLI_STACKTRACE=1 npm run shopify app deploy -- --verbose
| ~~~~~~~~~~~~~~~~~~~~~~~~
| The term 'SHOPIFY_CLI_STACKTRACE=1' is not recognized as a name of a
| cmdlet, function, script file, or executable program. Check the spelling
| of the name, or if a path was included, verify that the path is correct
| and try again.
Error: Process completed with exit code 1.
The problem is that I'm trying to deploy GH actions, and the cli cannot use Ink.
name: App Extensions - Stage
on:
push:
branches:
- stage
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install NPM dependencies
run: npm install
- name: Deploy
shell: pwsh
env:
SHOPIFY_CLI_PARTNERS_TOKEN: ${{ secrets.SHOPIFY_CLI_PARTNERS_TOKEN }}
SHOPIFY_API_KEY: ${{ secrets.STAGE_SHOPIFY_API_KEY }}
SHOPIFY_PRODUCT_ALLOWANCES_ID: ${{ secrets.STAGE_SHOPIFY_PRODUCT_ALLOWANCES_ID }}
run: npm run shopify app deploy
The error is
> shopify app deploy
ERROR Raw mode is not supported on the current process.stdin, which Ink uses
as input stream by default.
Read about how to prevent this error on
https://github.com/vadimdemedes/ink/#israwmodesupported
The above error occurred in the <SelectPrompt> component:
at SelectPrompt (file:///home/runner/work/.../node_modules/@shopify/cli-kit/dist/private/node/ui/components/SelectPrompt.js:12:25)
at App (file:///home/runner/work/.../node_modules/ink/build/components/App.js:18:9)
I had this error when using git bash on windows and trying to create an app. Switched to powershell as per this discussion and no longer have the error.
@asmerkin SHOPIFY_CLI_STACKTRACE=1
is setting an env variable, probably the way you pass it to CI it's going to be escaped and treated as a shell command. So you should add it to your list of env
variables instead.
I'd like to see the full trace so I can understand what it's trying to prompt you for.
I have the same issue too.
Same error here
So. As far as I can tell, there are 2 issues here:
-f
which is necessary for deploying in non-TTY environments. Otherwise, you'll be prompted to confirm the changes before deploying, and since you can't confirm, you see this error.Running it with -f
does the same.
Run npm run shopify app deploy -f
npm WARN using --force Recommended protections disabled.
> shopify
> shopify app deploy
The above error occurred in the <SelectPrompt> component:
at SelectPrompt (file:///home/runner/work/.../node_modules/@shopify/cli-kit/dist/private/node/ui/components/SelectPrompt.js:12:25)
at App (file:///home/runner/work/.../node_modules/ink/build/components/App.js:18:9)
ERROR Raw mode is not supported on the current process.stdin, which Ink uses
React will try to recreate this component tree from scratch using the error boundary you provided, InternalApp.
as input stream by default.
Read about how to prevent this error on
https://github.com/vadimdemedes/ink/#israwmodesupported
Need to let npm know the flag is for deploy
rather than npm itself.
npm run shopify app deploy -- -f
True. That worked. Thank you @amcaplan!
That worked. Thank you @amcaplan ! If you find the error "make: /usr/bin/mkdir: Command not found"
add "ln -s /bin/mkdir /usr/bin/mkdir" before "npm run shopify app deploy -- -f" https://stackoverflow.com/questions/64653051/make-usr-bin-mkdir-command-not-found-during-gem-install-nokogiri-in-ubuntu
ex) npm install && \ ln -s /bin/mkdir /usr/bin/mkdir && \ npm run shopify app deploy -- -f
The CLI still throw raw mode error
shopify version
Current Shopify CLI version: 3.45.4
npm verb cli /usr/local/bin/node /usr/local/bin/npm
npm info using npm@9.6.6
npm info using node@v20.2.0
npm verb title npm run shopify theme push abc 123
npm verb argv "run" "shopify" "theme" "push" "--loglevel" "silent" "abc" "-t" "123" "--force" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/root/.npm/_logs/2023-05-18T20_08_45_138Z-
npm verb logfile /root/.npm/_logs/2023-05-18T20_08_45_138Z-debug-0.log
npm WARN using --force Recommended protections disabled.
> abc@1.0.0 shopify
> shopify theme push abc 123
ERROR Raw mode is not supported on the current process.stdin, which Ink uses
as input stream by default.
Read about how to prevent this error on
https://github.com/vadimdemedes/ink/#israwmodesupported
- Read about how to prevent this error on
https://github.com/vadimdemedes/ink/#israwmodesupported
- value (node_modules/ink/build/components/App.js:46:31)
- (node_modules/ink/build/hooks/use-input.js:34:9)
-commitHookEffectLis (node_modules/react-reconciler/cjs/react-reconciler.devel
Mount opment.js:14778:26)
-commitPassiveMountO (node_modules/react-reconciler/cjs/react-reconciler.devel
Fiber opment.js:16609:11)
-commitPassiveMountEffect (node_modules/react-reconciler/cjs/react-reconciler.
_complete development.js:16569:9)
-commitPassiveMountEffe (node_modules/react-reconciler/cjs/react-reconciler.de
ts_begin velopment.js:16556:7)
-commitPassiveMountE (node_modules/react-reconciler/cjs/react-reconciler.devel
fects opment.js:16544:3)
-flushPassiveEffect (node_modules/react-reconciler/cjs/react-reconciler.develo
Impl pment.js:19182:3)
-flushPassiveEff (node_modules/react-reconciler/cjs/react-reconciler.developme
cts nt.js:19127:14)
-performSyncWorkOn (node_modules/react-reconciler/cjs/react-reconciler.develop
oot ment.js:18184:3)
The above error occurred in the <SelectPrompt> component:
at SelectPrompt (file:///builds/xyz/abc/node_modules/@shopify/cli-kit/dist/private/node/ui/components/SelectPrompt.js:12:25)
at App (file:///builds/xyz/abc/node_modules/ink/build/components/App.js:18:9)
React will try to recreate this component tree from scratch using the error boundary you provided, InternalApp.
npm verb exit 0
npm info ok
Using force for shopify/app also doesn't work now
$ npm run deploy -f
npm WARN using --force Recommended protections disabled.
> shopify-theme-app-extension@1.0.0 deploy
> shopify app deploy
ERROR Raw mode is not supported on the current process.stdin, which Ink uses
as input stream by default.
Read about how to prevent this error on
https://github.com/vadimdemedes/ink/#israwmodesupported
Using force for shopify/app also doesn't work now
@gopida When running commands through npm, you need an extra --
to separate flags you're giving to npm, vs. flags for the command you're running. So in your case it should be npm run deploy -- --force
.
Previously I wrote:
The CLI is not properly detecting a non-TTY shell, and continuing to prompt as though it'll work. We should throw a clearer error in such cases.
This has been improved in #1964 and is included in 3.46.
For everyone else, please be sure you're passing all required inputs when deploying from CI, including partners token and API key.
I also updated our developer docs to include the --
in the npm
CI/CD template.
I think we've fixed what there is to be fixed, closing the issue.
Please confirm that you have:
In which of these areas are you experiencing a problem?
Extension
Expected behavior
The command
npm run dev
in Shopify CLI should push the draft version of the Theme App Extension along with the Shopify App to a development theme.Actual behavior
The command initiates the start and push processes for both the app and the extension. It also generates the Dev Theme successfully, however, the process terminates with an error.
Verbose output
Reproduction steps
npm init @shopify/app@latest
npm run shopify app generate extension
npm run dev
Operating System
macOS Monterey, 12.6.3
Shopify CLI version (check your project's
package.json
if you're not sure)3.44.1
Shell
zsh
Node version (run
node -v
if you're not sure)v18.15.0
What language and version are you using in your application?
Node v18.15.0