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

Can not start a new project on Ubuntu 16.04, RN 35 #10375

Closed
Tiagojdferreira opened this issue Oct 13, 2016 · 8 comments
Closed

Can not start a new project on Ubuntu 16.04, RN 35 #10375

Tiagojdferreira opened this issue Oct 13, 2016 · 8 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Tiagojdferreira
Copy link

Issue Description

Just did a fresh install of React Native on ubuntu and I can not start a new project.
I am using nvm to run node v6.3.1, with npm 3.10.3.
I installed Android-studio, set up path variables, and installed watchman.
Android-studio works fine. (I can start an empty project)
Watchman works fine.

watchman -v
4.7.0

Steps to Reproduce / Code Snippets

npm install -g react-native-cli
react-native init AwesomeProject

Expected Results

Get the following error:

$ react-native init AwesomeProject
This will walk you through creating a new React Native project in /home/tiago/Documents/projects/AwesomeProject
Installing react-native package from npm...
Setting up new React Native app in /home/tiago/Documents/projects/AwesomeProject
module.js:442
    throw err;
    ^

Error: Cannot find module './src/init'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/tiago/Documents/projects/AwesomeProject/node_modules/gulp-sourcemaps/index.js:4:9)
    at Module._compile (module.js:541:32)
    at Module._extensions..js (module.js:550:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/tiago/Documents/projects/AwesomeProject/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)

Additional Information

  • React Native version:
    react-native-cli: 1.0.0
    react-native: 0.34.0
  • Platform(s) (iOS, Android, or both?): Android
  • Operating System (macOS, Linux, or Windows?): Linux Ubuntu 16.04 LTS Xenial 64-bit
@dtoebe
Copy link

dtoebe commented Oct 13, 2016

Same issue here on Ubuntu 16.10 and Node Ver: 6.8.0;

It only generates the AwesomeProject directory a package.json and node_modules/.

Upon running npm install in the project directory I get:

npm WARN react-native@0.35.0 requires a peer of react@~15.3.1 but none was installed.

@bmathews
Copy link

Caused by gulp-sourcemaps/gulp-sourcemaps#238

@sbalay
Copy link

sbalay commented Oct 13, 2016

Is there any workaround until the issue in gulp-sourcemaps gets resolved?

@nicbarker
Copy link

Same issue here on OSX 10.11.6

@Tiagojdferreira
Copy link
Author

Tiagojdferreira commented Oct 13, 2016

Go to the folder and do:

npm install gulp-sourcemaps@1.6
react-native android

Then just run the

@sbalay
Copy link

sbalay commented Oct 13, 2016

@Tiagojdferreira's solution works great. A little clarification for those starting a new project

mkdir project
cd project
npm i gulp-sourcemaps@1.6
cd ..
react-native init project
prompt: Directory project already exists. Continue?:  (no) YES

@nicbarker
Copy link

Great, thanks @sbalay and @Tiagojdferreira this fixed the issue for me.

@lacker
Copy link
Contributor

lacker commented Feb 9, 2017

I'm closing since there's a workaround here. Thanks folks for chiming in with fixes!

@lacker lacker closed this as completed Feb 9, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants