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

Error in react-packager #8899

Closed
saveliy-kremen opened this issue Jul 19, 2016 · 15 comments
Closed

Error in react-packager #8899

saveliy-kremen opened this issue Jul 19, 2016 · 15 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@saveliy-kremen
Copy link

Error in react-native/packager/react-packager/src/Server/index.js :653
SyntaxError: Unexpected token )

@KGALLET
Copy link

KGALLET commented Jul 20, 2016

which version of RN are u using?

@saveliy-kremen
Copy link
Author

last

@ide
Copy link
Contributor

ide commented Jul 20, 2016

My guess is that you're using an old version of Node. Try installing nvm and running:

nvm install 6
nvm alias default node

@saveliy-kremen
Copy link
Author

The error persists:
Error in react-native/packager/react-packager/src/Server/index.js :623
SyntaxError: Unexpected token )

@saveliy-kremen
Copy link
Author

@ide
Copy link
Contributor

ide commented Jul 20, 2016

Maybe a bad babel config somewhere then?

@saveliy-kremen
Copy link
Author

I do not know.
I'm trying to do everything on the instructions on Win7:
choco install nodejs.install
choco install python2
npm install -g react-native-cli
react-native init Project

D:\Локальные проекты\React\Native\Project\node_modules\react-native\packager\react-packager\src\Server\index.js:623
),
^
SyntaxError: Unexpected token )
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:513:28)
at Module._extensions..js (module.js:550:10)
at Object.require.extensions.(anonymous function) [as .js](D:Локальные проектыReactNativeProjectnode_modulesbabel-registerlibnode.js:166:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (D:\Локальные проекты\React\Native\Project\node_modules\react-native\local-cli\bundle\buildBundle.js:17:16)

@grabbou
Copy link
Contributor

grabbou commented Jul 29, 2016

Please share output of node --version and ls -all when run from within the root folder of your project.

@jackbillstrom
Copy link

jackbillstrom commented Aug 27, 2016

node --version
v6.4.0

ls -all

total 165
drwxr-xr-x 1 Administratör 197121   0 Aug 27 20:54 ./
drwxr-xr-x 1 Administratör 197121   0 Aug 27 20:44 ../
drwxr-xr-x 1 Administratör 197121   0 Aug 27 20:54 node_modules/
-rw-r--r-- 1 Administratör 197121 207 Aug 27 20:54 package.json

This is the output I get when I "react-native init"

This will walk you through creating a new React Native project in C:\Users\Administratör.WINDOWS-J9P7RTI\Documents\Programmering\knuffa
Installing react-native package from npm...
C:\Users\Administratör.WINDOWS-J9P7RTI\Documents\Programmering\knuffa\node_modules\react-native\packager\react-packager\src\node-haste\FileWatcher\index.js:118
    );
    ^
SyntaxError: Unexpected token )
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:528:28)
    at Module._extensions..js (module.js:565:10)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\Administratör.WINDOWS-J9P7RTI\Documents\Programmering\knuffa\node_modules\babel-register\lib\node.js:154:7)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\Administratör.WINDOWS-J9P7RTI\Documents\Programmering\knuffa\node_modules\react-native\packager\react-packager\src\node-haste\index.js:13:21)

I have the exact error, followed the setup guide on the official website.

@rozele
Copy link
Contributor

rozele commented Aug 29, 2016

@jackbillstrom which version of npm?

@jackbillstrom
Copy link

@rozele Currently running NPM 3.10.7.

@jackbillstrom
Copy link

jackbillstrom commented Sep 1, 2016

@kittens @ide @grabbou Any help? Seen the error on Stackoverflow but no answers on those questions. Will become insane without RN :(

@localhosted
Copy link

Same error in #10033

@lacker
Copy link
Contributor

lacker commented Oct 25, 2016

Hey, without being able to reproduce this I don't think we can make progress here. I think we would need more information, specifically a way to reproduce this bug consistently on a new setup. I am going to close this issue but if you do have enough information to reproduce it then feel free to open a new issue.

@lacker lacker closed this as completed Oct 25, 2016
@rozele
Copy link
Contributor

rozele commented Oct 25, 2016

@lacker I was able to reproduce this consistently by creating a directory name with non-ASCII characters, but either way I think leaving #10154 open should cover the majority of these issues. The babel-core change was already made, we just have to wait for a new release and take the upgrade here.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 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

Successfully merging a pull request may close this issue.

9 participants