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

Project fails to run on Win10 #17

Open
alariej opened this issue Mar 23, 2020 · 2 comments
Open

Project fails to run on Win10 #17

alariej opened this issue Mar 23, 2020 · 2 comments
Labels
bug Something isn't working windows

Comments

@alariej
Copy link

alariej commented Mar 23, 2020

Hi, I am trying to create a ReactXP project on an actual Win10 machine. I installed VS 2019 Community and all requirements for creating react-native-windows projects (successfully tested following https://microsoft.github.io/react-native-windows/docs/getting-started). I use npx create-rx-app testrxp to create the project. But neither npm run start:web nor npm run start:windows successfully launch. I am using:

node --version: v12.9.1 (had to downgrade because of compiling issues with react-native-windows)
npm --version: 6.10.2

Is there a proven setup for using create-rx-app on Win10?

Thanks.

C:\testrxp>npm run start:web

> [email protected] start:web C:\testrxp
> cross-env platform=web webpack-dev-server --config=web/webpack/dev.js --progress --colors --mode=development

Starting type checking service...
10% building 1/1 modules 0 activei 「wds」: Project is running at http://localhost:9999/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from C:\testrxp\src
11% building 9/15 modules 6 active C:\testrxp\node_modules\webpack-dev-server\client\utils\createSocketUrl.jsi 「wdm」: wait until bundle finished: /
98% after emittingType checking in progress...
× 「wdm」:    37 modules

ERROR in ./src/index.tsx
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] C:\testrxp\src\index.tsx: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\\testrxp\\node_modules\\@babel\\preset-env\\lib\\index.js")
    at getPlugin (C:\testrxp\node_modules\@babel\preset-env\lib\index.js:67:11)
    at C:\testrxp\node_modules\@babel\preset-env\lib\index.js:258:62
    at Array.map (<anonymous>)
    at C:\testrxp\node_modules\@babel\preset-env\lib\index.js:258:43
    at C:\testrxp\node_modules\@babel\helper-plugin-utils\lib\index.js:19:12
    at C:\testrxp\node_modules\@babel\core\lib\config\full.js:199:14
    at Generator.next (<anonymous>)
    at Function.<anonymous> (C:\testrxp\node_modules\@babel\core\lib\gensync-utils\async.js:26:3)
    at Generator.next (<anonymous>)
    at step (C:\testrxp\node_modules\gensync\index.js:254:32)
i 「wdm」: Failed to compile.
No type errors found
Version: typescript 3.8.3
Time: 8817ms
C:\testrxp>npm run start:windows

> [email protected] start:windows C:\testrxp
> yarn rn-cli run-windows

yarn run v1.22.0
$ node scripts/react-native.js run-windows
Restoring NuGet packages
Error parsing solution file at C:\testrxp\windows\testrxp.sln: Exception has been thrown by the target of an invocation.
Failed to restore the NuGet packages
Done in 4.58s.
@alariej
Copy link
Author

alariej commented Mar 23, 2020

OK, Web now works by adding the missing Babel Plugin entry in \node_modules\@babel\preset-env\lib\available-plugins.js

But the Windows build seems like a much bigger issue :-(

@a-tarasyuk a-tarasyuk added windows bug Something isn't working labels Mar 24, 2020
@mgolden6
Copy link

mgolden6 commented Apr 18, 2020

Thanks @alariej - works for me!

This takes 4 steps:

  1. navigate to \node_modules\@babel\preset-env\lib\available-plugins.js

  2. add var _pluginProposalNumericSeparator = _interopRequireDefault(require("@babel/plugin-proposal-numeric-separator")) with the other var's

  3. add "proposal-numeric-separator": _pluginProposalNumericSeparator.default, with the others in var _default so it gets exported with default

  4. run npm i @babel/plugin-proposal-numeric-separator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

3 participants