React failing to compile postcss, yamldumper.js












1














On windows When trying to compile a freshly made react app from "create-react-app" I am receiving a compile error. Not sure where the unexpected token is coming from. The error is referring to a unexpected token in index.css from the creation of create-react-app.



index.css:



body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}


Output below from install and run:



D:Projectsreactsites>cd Test2

D:ProjectsreactsitesTest2>npx create-react-app derpsocial

Creating a new React app in D:ProjectsreactsitesTest2derpsocial.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.9.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[-----------------------------------------------------------------------] 0/1283(
node:3584) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.12.
3", while you're on "1.9.4".
info To upgrade, download the latest installer at "https://yarnpkg.com/latest.msi".
success Saved 6 new dependencies.
info Direct dependencies
├─ react-dom@16.6.3
├─ react-scripts@2.1.1
└─ react@16.6.3
info All dependencies
├─ babel-preset-react-app@6.1.0
├─ react-dev-utils@6.1.1
├─ react-dom@16.6.3
├─ react-error-overlay@5.1.0
├─ react-scripts@2.1.1
└─ react@16.6.3
Done in 236.47s.

Initialized a git repository.

Success! Created derpsocial at D:ProjectsreactsitesTest2derpsocial
Inside that directory, you can run several commands:

yarn start
Starts the development server.

yarn build
Bundles the app into static files for production.

yarn test
Starts the test runner.

yarn eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can't go back!

We suggest that you begin by typing:

cd derpsocial
yarn start

Happy hacking!

D:ProjectsreactsitesTest2>cd derpsocial

D:ProjectsreactsitesTest2derpsocial>yarn start
yarn run v1.9.4
$ react-scripts start
Failed to compile.

./src/index.css (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
D:ProjectsreactsitesTest2derpsocialnode_modulesjs-yamllibjs-yamldumper.js:275
return result;
^^^^^^

SyntaxError: Unexpected token return

D:ProjectsreactsitesTest2derpsocial>npm -version
6.4.1

D:ProjectsreactsitesTest2derpsocial>node -v
v10.13.0

D:ProjectsreactsitesTest2derpsocial>


I've tried to update all packages, even took out the css from index.css with the same error present. Reinstalled node and npm.










share|improve this question



























    1














    On windows When trying to compile a freshly made react app from "create-react-app" I am receiving a compile error. Not sure where the unexpected token is coming from. The error is referring to a unexpected token in index.css from the creation of create-react-app.



    index.css:



    body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    }

    code {
    font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
    monospace;
    }


    Output below from install and run:



    D:Projectsreactsites>cd Test2

    D:ProjectsreactsitesTest2>npx create-react-app derpsocial

    Creating a new React app in D:ProjectsreactsitesTest2derpsocial.

    Installing packages. This might take a couple of minutes.
    Installing react, react-dom, and react-scripts...

    yarn add v1.9.4
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    [-----------------------------------------------------------------------] 0/1283(
    node:3584) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    info fsevents@1.2.4: The platform "win32" is incompatible with this module.
    info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
    [3/4] Linking dependencies...
    [4/4] Building fresh packages...

    success Saved lockfile.
    warning Your current version of Yarn is out of date. The latest version is "1.12.
    3", while you're on "1.9.4".
    info To upgrade, download the latest installer at "https://yarnpkg.com/latest.msi".
    success Saved 6 new dependencies.
    info Direct dependencies
    ├─ react-dom@16.6.3
    ├─ react-scripts@2.1.1
    └─ react@16.6.3
    info All dependencies
    ├─ babel-preset-react-app@6.1.0
    ├─ react-dev-utils@6.1.1
    ├─ react-dom@16.6.3
    ├─ react-error-overlay@5.1.0
    ├─ react-scripts@2.1.1
    └─ react@16.6.3
    Done in 236.47s.

    Initialized a git repository.

    Success! Created derpsocial at D:ProjectsreactsitesTest2derpsocial
    Inside that directory, you can run several commands:

    yarn start
    Starts the development server.

    yarn build
    Bundles the app into static files for production.

    yarn test
    Starts the test runner.

    yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can't go back!

    We suggest that you begin by typing:

    cd derpsocial
    yarn start

    Happy hacking!

    D:ProjectsreactsitesTest2>cd derpsocial

    D:ProjectsreactsitesTest2derpsocial>yarn start
    yarn run v1.9.4
    $ react-scripts start
    Failed to compile.

    ./src/index.css (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
    D:ProjectsreactsitesTest2derpsocialnode_modulesjs-yamllibjs-yamldumper.js:275
    return result;
    ^^^^^^

    SyntaxError: Unexpected token return

    D:ProjectsreactsitesTest2derpsocial>npm -version
    6.4.1

    D:ProjectsreactsitesTest2derpsocial>node -v
    v10.13.0

    D:ProjectsreactsitesTest2derpsocial>


    I've tried to update all packages, even took out the css from index.css with the same error present. Reinstalled node and npm.










    share|improve this question

























      1












      1








      1


      0





      On windows When trying to compile a freshly made react app from "create-react-app" I am receiving a compile error. Not sure where the unexpected token is coming from. The error is referring to a unexpected token in index.css from the creation of create-react-app.



      index.css:



      body {
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
      "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
      sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      }

      code {
      font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
      monospace;
      }


      Output below from install and run:



      D:Projectsreactsites>cd Test2

      D:ProjectsreactsitesTest2>npx create-react-app derpsocial

      Creating a new React app in D:ProjectsreactsitesTest2derpsocial.

      Installing packages. This might take a couple of minutes.
      Installing react, react-dom, and react-scripts...

      yarn add v1.9.4
      [1/4] Resolving packages...
      [2/4] Fetching packages...
      [-----------------------------------------------------------------------] 0/1283(
      node:3584) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
      info fsevents@1.2.4: The platform "win32" is incompatible with this module.
      info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
      [3/4] Linking dependencies...
      [4/4] Building fresh packages...

      success Saved lockfile.
      warning Your current version of Yarn is out of date. The latest version is "1.12.
      3", while you're on "1.9.4".
      info To upgrade, download the latest installer at "https://yarnpkg.com/latest.msi".
      success Saved 6 new dependencies.
      info Direct dependencies
      ├─ react-dom@16.6.3
      ├─ react-scripts@2.1.1
      └─ react@16.6.3
      info All dependencies
      ├─ babel-preset-react-app@6.1.0
      ├─ react-dev-utils@6.1.1
      ├─ react-dom@16.6.3
      ├─ react-error-overlay@5.1.0
      ├─ react-scripts@2.1.1
      └─ react@16.6.3
      Done in 236.47s.

      Initialized a git repository.

      Success! Created derpsocial at D:ProjectsreactsitesTest2derpsocial
      Inside that directory, you can run several commands:

      yarn start
      Starts the development server.

      yarn build
      Bundles the app into static files for production.

      yarn test
      Starts the test runner.

      yarn eject
      Removes this tool and copies build dependencies, configuration files
      and scripts into the app directory. If you do this, you can't go back!

      We suggest that you begin by typing:

      cd derpsocial
      yarn start

      Happy hacking!

      D:ProjectsreactsitesTest2>cd derpsocial

      D:ProjectsreactsitesTest2derpsocial>yarn start
      yarn run v1.9.4
      $ react-scripts start
      Failed to compile.

      ./src/index.css (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
      D:ProjectsreactsitesTest2derpsocialnode_modulesjs-yamllibjs-yamldumper.js:275
      return result;
      ^^^^^^

      SyntaxError: Unexpected token return

      D:ProjectsreactsitesTest2derpsocial>npm -version
      6.4.1

      D:ProjectsreactsitesTest2derpsocial>node -v
      v10.13.0

      D:ProjectsreactsitesTest2derpsocial>


      I've tried to update all packages, even took out the css from index.css with the same error present. Reinstalled node and npm.










      share|improve this question













      On windows When trying to compile a freshly made react app from "create-react-app" I am receiving a compile error. Not sure where the unexpected token is coming from. The error is referring to a unexpected token in index.css from the creation of create-react-app.



      index.css:



      body {
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
      "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
      sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      }

      code {
      font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
      monospace;
      }


      Output below from install and run:



      D:Projectsreactsites>cd Test2

      D:ProjectsreactsitesTest2>npx create-react-app derpsocial

      Creating a new React app in D:ProjectsreactsitesTest2derpsocial.

      Installing packages. This might take a couple of minutes.
      Installing react, react-dom, and react-scripts...

      yarn add v1.9.4
      [1/4] Resolving packages...
      [2/4] Fetching packages...
      [-----------------------------------------------------------------------] 0/1283(
      node:3584) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
      info fsevents@1.2.4: The platform "win32" is incompatible with this module.
      info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
      [3/4] Linking dependencies...
      [4/4] Building fresh packages...

      success Saved lockfile.
      warning Your current version of Yarn is out of date. The latest version is "1.12.
      3", while you're on "1.9.4".
      info To upgrade, download the latest installer at "https://yarnpkg.com/latest.msi".
      success Saved 6 new dependencies.
      info Direct dependencies
      ├─ react-dom@16.6.3
      ├─ react-scripts@2.1.1
      └─ react@16.6.3
      info All dependencies
      ├─ babel-preset-react-app@6.1.0
      ├─ react-dev-utils@6.1.1
      ├─ react-dom@16.6.3
      ├─ react-error-overlay@5.1.0
      ├─ react-scripts@2.1.1
      └─ react@16.6.3
      Done in 236.47s.

      Initialized a git repository.

      Success! Created derpsocial at D:ProjectsreactsitesTest2derpsocial
      Inside that directory, you can run several commands:

      yarn start
      Starts the development server.

      yarn build
      Bundles the app into static files for production.

      yarn test
      Starts the test runner.

      yarn eject
      Removes this tool and copies build dependencies, configuration files
      and scripts into the app directory. If you do this, you can't go back!

      We suggest that you begin by typing:

      cd derpsocial
      yarn start

      Happy hacking!

      D:ProjectsreactsitesTest2>cd derpsocial

      D:ProjectsreactsitesTest2derpsocial>yarn start
      yarn run v1.9.4
      $ react-scripts start
      Failed to compile.

      ./src/index.css (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
      D:ProjectsreactsitesTest2derpsocialnode_modulesjs-yamllibjs-yamldumper.js:275
      return result;
      ^^^^^^

      SyntaxError: Unexpected token return

      D:ProjectsreactsitesTest2derpsocial>npm -version
      6.4.1

      D:ProjectsreactsitesTest2derpsocial>node -v
      v10.13.0

      D:ProjectsreactsitesTest2derpsocial>


      I've tried to update all packages, even took out the css from index.css with the same error present. Reinstalled node and npm.







      javascript css node.js reactjs compiler-errors






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 '18 at 18:29









      BilliAmBilliAm

      3651414




      3651414
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380645%2freact-failing-to-compile-postcss-yamldumper-js%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380645%2freact-failing-to-compile-postcss-yamldumper-js%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

          ts Property 'filter' does not exist on type '{}'

          mat-slide-toggle shouldn't change it's state when I click cancel in confirmation window