Error in react-packager
Error in react-native/packager/react-packager/src/Server/index.js :653 SyntaxError: Unexpected token )
which version of RN are u using?
last
My guess is that you're using an old version of Node. Try installing nvm and running:
nvm install 6
nvm alias default node
The error persists: Error in react-native/packager/react-packager/src/Server/index.js :623 SyntaxError: Unexpected token )
My guess is that extra comma https://github.com/facebook/react-native/blob/master/packager/react-packager/src/Server/index.js :line 652
Maybe a bad babel config somewhere then?
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.
Please share output of node --version and ls -all when run from within the root folder of your project.
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.
@jackbillstrom which version of npm?
@rozele Currently running NPM 3.10.7.
@kittens @ide @grabbou Any help? Seen the error on Stackoverflow but no answers on those questions. Will become insane without RN :(
Same error in https://github.com/facebook/react-native/issues/10033
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 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.