Closed Devashish007 closed 6 years ago
Hi @Devashish007 you ran awsmobile init inside of a valid react or react-native project? awsmobile-cli uses yarn by default on those projects if you haven't installed it will fail. We can improve our docs.
Hi @elorzafe ! The issue was with yarn. Thanks for the clarification. :)
I am working through the documentation stated here.
Whenever I run the command
awsmobile init
, I am faced with the following error:Please tell us about your project: ? Where is your project's source directory: src ? Where is your project's distribution directory that stores build artifacts: build ? What is your project's build command: npm run-script build ? What is your project's start command for local test run: npm run-script start
? What awsmobile project name would you like to use: myAmplifyProject-2018-03-27-09-52-02
Successfully created AWS Mobile Hub project: myAmplifyProject-2018-03-27-09-52-02
retrieving the latest backend awsmobile project information awsmobile project's details logged at: awsmobilejs/#current-backend-info/backend-details.json awsmobile project's access information logged at: awsmobilejs/#current-backend-info/aws-exports.js awsmobile project's access information copied to: src/aws-exports.js awsmobile project's specifications logged at: awsmobilejs/#current-backend-info/mobile-hub-project.yml contents in #current-backend-info/ is synchronized with the latest in the aws cloud
Executing yarn add aws-amplify ... events.js:163 throw er; // Unhandled 'error' event ^
Error: spawn yarn ENOENT at exports._errnoException (util.js:1050:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickDomainCallback (internal/process/next_tick.js:128:9)
I am using node v7.10.1 and npm 4.2.0. I have tried it with two different systems and in both the cases the errors are the same. Any insight into the same?