Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Unexpected token 'if' while compiling ejs #800

Closed
tyankatsu0105 opened this issue May 7, 2020 · 1 comment · Fixed by #801
Closed

SyntaxError: Unexpected token 'if' while compiling ejs #800

tyankatsu0105 opened this issue May 7, 2020 · 1 comment · Fixed by #801

Comments

@tyankatsu0105
Copy link
Contributor

Describe the bug
I think this is related

To Reproduce
Steps to reproduce the behavior:

  1. npx shipjs setup

Expected behavior
Not occur error

Screenshots

npx shipjs setup
? What is your base branch?
  This is also called "Default branch".
  You usually merge pull-requests into this branch. master
? What is your release branch?
  If you maintain a branch where you keep latest release, choose the branch.
  If you don't, choose your base branch. master
? Which CI configure? GitHub Actions
? Add manual prepare with issue comment?
  You can create `@shipjs prepare` comment on any issue and then github actions run `shipjs prepare` No
? Schedule your release? No
› Installing Ship.js
› Adding scripts to package.json
› Creating ship.config.js
› Creating GitHub Actions configuration
SyntaxError: Unexpected token 'if' while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:
https://github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass `async: true` as an option.
    at new Function (<anonymous>)
    at Template.compile (/Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/node_modules/ejs/lib/ejs.js:649:12)
    at Object.compile (/Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/node_modules/ejs/lib/ejs.js:385:16)
    at handleCache (/Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/node_modules/ejs/lib/ejs.js:233:18)
    at Proxy.exports.render (/Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/node_modules/ejs/lib/ejs.js:412:10)
    at getBaseConfig (/Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/src/step/setup/CI/addGitHubActions.js:82:14)
    at /Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/src/step/setup/CI/addGitHubActions.js:25:20
    at runStep (/Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/src/step/runStep.js:11:10)
    at Object.default [as addConfig] (/Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/src/step/setup/CI/addGitHubActions.js:18:3)
    at setup (/Users/tyankatsu/.npm/_npx/11818/lib/node_modules/shipjs/src/flow/setup.js:45:19)

Environment (please complete the following information):

  • environment: (your local machine, CircleCI, Travis CI, etc.) local machine
  • node -v: v12.16.2
  • npm -v or yarn -v: 6.14.4
  • Ship.js version: 0.18.3

Additional context
Add any other context about the problem here.

@tyankatsu0105
Copy link
Contributor Author

tyankatsu0105 commented May 7, 2020

OK.
I found bugs.
I'll send PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant