Menu

Fetch API is an experimental feature

How to fix Fetch API warning in ReactJS?

ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time (Use `node --trace-warnings ...` to show where the warning was created)

Resolution

Pending

Module not found in ReactJS

Error

ModuleNotFoundError: Module not found: Error: Can't resolve '../../public/page-data/sq/d/595050432.json' 

Cause

The page or component that we created doesn't have .js extension.

Resolution

Create the file with required extension. e.g. reactPageSample.js

Running scripts is disabled on this system

Cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170

At line:1 char:1

+ gatsby develop

+ ~~~~~~

    + CategoryInfo          : SecurityError: (:) [], PSSecurityException

    + FullyQualifiedErrorId : UnauthorizedAccess



Resolution

Open CMD or PowerShell and execute the below command and provide the appropriate permission.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\mohammadr> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y

References:

1. https://stackoverflow.com/questions/67150436/cannot-be-loaded-because-running-scripts-is-disabled-on-this-system-for-more-in