GeekyAnts / vue-native-cli

Write Native Mobile Apps using Vue. Vue Native is a wrapper around React Native APIs
92 stars 21 forks source link

vue-native-cli init appname is faild on docker #30

Closed raa0121 closed 4 years ago

raa0121 commented 4 years ago

I can’t create new vue-native project becose don’t generate app.json.

FROM node:10-alpine

RUN apk add --no-cache libcrypto1.0 libgcc libstdc++ bash curl && \
    curl -o- -L https://yarnpkg.com/install.sh | bash && \
    yarn global add expo-cli vue-native-cli react-native-cli create-react-native-app
COPY --from=icalialabs/watchman:4.9-alpine /usr/local/bin/watchman* /usr/local/bin/
RUN mkdir -p /usr/src/app && \
    mkdir -p /usr/local/var/run/watchman && \
    touch /usr/local/var/run/watchman/.not-empty
WORKDIR /usr/src/app
$ docker run —rm -it -v `pwd`:/usr/src/app vue-native vue-native init appname
Using globally installed expo-cli 3.2.2

Creating Vue Native project appname

⠋ Creating project with expo-cli
✔ Please enter a few initial configuration values.
  Read more: https://docs.expo.io/versions/latest/workflow/configuration/ · 100% completed
? Yarn v1.12.3 found. Use Yarn to install dependencies? Yes
Extracting project files...
Customizing project...
Can't read JSON file: /usr/src/app/appname/app.json
└─ Cause: Error: ENOENT: no such file or directory, open '/usr/src/app/appname/app.json'
✔ Created project with expo-cli
...
(node:1) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'app.json'
    at Object.openSync (fs.js:439:3)
    at Object.readFileSync (fs.js:344:35)
    at setupVueNativeApp (/usr/local/share/.config/yarn/global/node_modules/vue-native-cli/src/index.js:295:35)
    at createExpoProject (/usr/local/share/.config/yarn/global/node_modules/vue-native-cli/src/index.js:124:9)
    at init (/usr/local/share/.config/yarn/global/node_modules/vue-native-cli/src/index.js:101:5)
    at Command.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/vue-native-cli/src/index.js:69:7)
    at Command.listener (/usr/local/share/.config/yarn/global/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:182:13)
    at Command.parseArgs (/usr/local/share/.config/yarn/global/node_modules/commander/index.js:651:12)
    at Command.parse (/usr/local/share/.config/yarn/global/node_modules/commander/index.js:474:21)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
raa0121 commented 4 years ago

I found https://github.com/lovell/sharp/issues/1627 . npm install -g --unsafe-perm expo-cli vue-native-cli react-native-cli create-react-native-app is success