create-tauri-app icon indicating copy to clipboard operation
create-tauri-app copied to clipboard

[bug] yarn start react template

Open DaviRain-Su opened this issue 3 years ago • 3 comments

Describe the bug

yarn run v1.22.10
$ cross-env BROWSER=none react-scripts start
/Users/davirain/davirain/hello-world/node_modules/@babel/template/lib/options.js:55
  if (syntacticPlaceholders 
                            

SyntaxError: Unexpected end of input
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1026:15)
    at Module._compile (node:internal/modules/cjs/loader:1061:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/davirain/davirain/hello-world/node_modules/@babel/template/lib/builder.js:8:16)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)

Node.js v17.6.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Reproduction

  1. select react template
  2. yarn start

Expected behavior

No response

Platform and versions

Operating System - Mac OS, version 12.0.1 X64

Node.js environment
  Node.js - 17.6.0
  @tauri-apps/cli - 1.0.0-rc.5
  @tauri-apps/api - 1.0.0-rc.1

Global packages
  npm - 8.5.1
  pnpm - Not installed
  yarn - 1.22.10

Rust environment
  rustup - 1.24.3
  rustc - 1.61.0-nightly
  cargo - 1.61.0-nightly
  toolchain - nightly-aarch64-apple-darwin 

App directory structure
/node_modules
/public
/src-tauri
/.git
/src

App
  tauri - 1.0.0-rc.3
  tauri-build - 1.0.0-rc.3
  tao - 0.6.3
  wry - 0.13.3
  build-type - bundle
  CSP - unset
  distDir - ../build
  devPath - http://localhost:3000/
  framework - React

Stack trace

No response

Additional context

No response

DaviRain-Su avatar Mar 06 '22 18:03 DaviRain-Su

Did this error happen after it was generated with create-tauri-app? It looks like the error happens when you attempt to start it up after it was generated. Does the error go away if you remove (your node_modules) and try reinstalling?

jbolda avatar Mar 07 '22 19:03 jbolda

Did this error happen after it was generated with create-tauri-app? It looks like the error happens when you attempt to start it up after it was generated. Does the error go away if you remove (your node_modules) and try reinstalling?

ye, just remove 'node_modules' also have problem

DaviRain-Su avatar Mar 10 '22 02:03 DaviRain-Su

do you still encounter this issue when creating new apps?

amrbashir avatar May 09 '22 12:05 amrbashir