Skip to content

npm ERR! code ELIFECYCLE Invalid options object #10393

Closed

Description

@AlexShirin

Describe the bug

my-app@0.1.0 start F:!JS\my-app
react-scripts start
Invalid options object. React Refresh Plugin has been initialized using an options object that does not match the API schema. - options.overlay.module: The provided value "F:\!JS\my-app\node_modules\react-dev-utils\refreshOverlayInterop.js" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.

F:!JS\my-app\node_modules\react-dev-utils\refreshOverlayInterop.js
// @remove-on-eject-begin
/**

  • Copyright (c) 2015-present, Facebook, Inc.
  • This source code is licensed under the MIT license found in the
  • LICENSE file in the root directory of this source tree.
    */
    // @remove-on-eject-end
    'use strict';

const {
dismissRuntimeErrors,
reportRuntimeError,
} = require('react-error-overlay');

module.exports = {
clearRuntimeErrors: dismissRuntimeErrors,
handleRuntimeError: reportRuntimeError,
};

Environment

(Win10)

npm -version
6.14.10
node --version
v14.15.4
VSCode

Steps to reproduce

  1. npx create-react-app my-app
  2. cd my-app
  3. npm start

Activity

  1. jakubsuchybio commented on Mar 23, 2021

    @jakubsuchybio

    I also have this problems, is there any solution?

  2. jakubsuchybio commented on Mar 23, 2021

    @jakubsuchybio

    The problem is that the PATH contains exclamation mark "!", if you move your repo to the path without any "!", it then works...

  3. michelgrolet commented on Aug 18, 2021

    @michelgrolet

    @jakubsuchybio
    Thank you so much ! I feel so stupid, I have been stuck for a day because of this error.

  4. sebastianf777 commented on Sep 10, 2021

    @sebastianf777

    The problem is that the PATH contains exclamation mark "!", if you move your repo to the path without any "!", it then works...

    I love you man YOU MUST KNOW!

  5. DonnaLit commented on Sep 15, 2021

    @DonnaLit

    In my case. The file was not found hence the error. I created refreshOverlayIntertrops.js with is code:

    // @remove-on-eject-begin
    /**

    • Copyright (c) 2015-present, Facebook, Inc.
    • This source code is licensed under the MIT license found in the
    • LICENSE file in the root directory of this source tree.
      */
      // @remove-on-eject-end
      'use strict';

    const {
    dismissRuntimeErrors,
    reportRuntimeError,
    } = require('react-error-overlay');

    module.exports = {
    clearRuntimeErrors: dismissRuntimeErrors,
    handleRuntimeError: reportRuntimeError,
    };

    My problem was sorted

  6. rootfellen commented on Oct 20, 2021

    @rootfellen

    In my case. The file was not found hence the error. I created refreshOverlayIntertrops.js with is code:

    // @remove-on-eject-begin /**

    • Copyright (c) 2015-present, Facebook, Inc.
    • This source code is licensed under the MIT license found in the
    • LICENSE file in the root directory of this source tree.
      */
      // @remove-on-eject-end
      'use strict';

    const { dismissRuntimeErrors, reportRuntimeError, } = require('react-error-overlay');

    module.exports = { clearRuntimeErrors: dismissRuntimeErrors, handleRuntimeError: reportRuntimeError, };

    My problem was sorted

    Thank you, it helped me.

  7. niteshthemerndeveloper commented on Dec 5, 2021

    @niteshthemerndeveloper

    The problem is in the folder path, your path contains an exclamation mark! not in the node_module folder but in your local folder. If you move your project to any other folder it should work fine.

    Let's Master React!

  8. AliceSum commented on May 12, 2022

    @AliceSum

    #11762

    Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions