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

First step fails #62

Closed
dstarr opened this issue Nov 22, 2020 · 2 comments
Closed

First step fails #62

dstarr opened this issue Nov 22, 2020 · 2 comments
Labels
needs attention 👋 Waiting on Microsoft to provide feedback

Comments

@dstarr
Copy link

dstarr commented Nov 22, 2020

Where did you get the code?

https://docs.microsoft.com/en-us/graph/tutorials/react

Describe the bug

Can't successfully launch generated app.

Works without typescript flag

To Reproduce

Steps to reproduce the behavior:

  1. I run npx [email protected] graph-tutorial --template typescript
  2. Run npm start
  3. Get error

Expected behavior

Browser opens

Desktop

MacOS
bash
Edge Browser

Additional context

I made sure to use the 12.16.1 version of Node

This is the resulting error message.

10:31 $ npm start

> [email protected] start /Users/davidstarr/projects/rjsgraphapi/graph-tutorial
> react-scripts start

/Users/davidstarr/projects/rjsgraphapi/graph-tutorial/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js:239
      appTsConfig.compilerOptions[option] = value;
                                          ^

TypeError: Cannot assign to read only property 'jsx' of object '#<Object>'
    at verifyTypeScriptSetup (/Users/davidstarr/projects/rjsgraphapi/graph-tutorial/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js:239:43)
    at Object.<anonymous> (/Users/davidstarr/projects/rjsgraphapi/graph-tutorial/node_modules/react-scripts/scripts/start.js:31:1)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
@ghost ghost added the needs triage 🔍 New issue, needs triage label Nov 22, 2020
@jasonjoh
Copy link
Member

Hmm. This is all generic React stuff, nothing special (see https://create-react-app.dev/docs/getting-started#creating-a-typescript-app). The error seems to indicate an issue with TypeScript on your machine. I did some searching and found:

https://arbaz5256.medium.com/typeerror-cannot-assign-to-read-only-property-jsx-of-object-object-5caeaaad1b5c
facebook/create-react-app#9868

@jasonjoh jasonjoh added needs author feedback Waiting for author (creator) of issue to provide more info and removed needs triage 🔍 New issue, needs triage labels Nov 30, 2020
@dstarr
Copy link
Author

dstarr commented Dec 2, 2020

Okay, thank you very much for poking around on it.

@ghost ghost added needs attention 👋 Waiting on Microsoft to provide feedback and removed needs author feedback Waiting for author (creator) of issue to provide more info labels Dec 2, 2020
@dstarr dstarr closed this as completed Dec 2, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs attention 👋 Waiting on Microsoft to provide feedback
Projects
None yet
Development

No branches or pull requests

2 participants