简体   繁体   中英

Why React js at runtime in visual studio 2017 produce errors

Why React js at runtime in visual studio 2017 produce errors? Hello everybody, I wonder why on running React js in my visual studio 2017 (15.8.9) I face a bunch of errors and the react js doesn't start! It just gives the errors which are below : (Plus, I also disabled my antivirus and firewall)

. . .

1>npm WARN optional SKIPPING OPTIONAL DEPENDENCY: yargs@3.10.0 (node_modules\handlebars\node_modules\yargs):
1>npm WARN optional SKIPPING OPTIONAL DEPENDENCY : error : EPERM: operation not permitted, unlink 'F:\C#\Exercises\WebApplication5\WebApplication5\ClientApp\node_modules\.staging\yargs-80910015\CHANGELOG.md'
1>
1>npm ERR! path F:\C#\Exercises\WebApplication5\WebApplication5\ClientApp\node_modules\.staging\acorn-e9fc9845\README.md
1>npm ERR! code EPERM
1>npm ERR! errno -4048
1>npm ERR! syscall unlink
1>EXEC : npm ERR! error : EPERM: operation not permitted, unlink 'F:\C#\Exercises\WebApplication5\WebApplication5\ClientApp\node_modules\.staging\acorn-e9fc9845\README.md'
1>npm ERR!  { [Error: EPERM: operation not permitted, unlink 'F:\C#\Exercises\WebApplication5\WebApplication5\ClientApp\node_modules\.staging\acorn-e9fc9845\README.md']
1>npm ERR!   cause:
1>EXEC : npm ERR!    { error : EPERM: operation not permitted, unlink 'F:\C#\Exercises\WebApplication5\WebApplication5\ClientApp\node_modules\.staging\acorn-e9fc9845\README.md'
1>npm ERR!      errno: -4048,
1>npm ERR!      code: 'EPERM',
1>npm ERR!      syscall: 'unlink',
1>npm ERR!      path:
1>npm ERR!       'F:\\C#\\Exercises\\WebApplication5\\WebApplication5\\ClientApp\\node_modules\\.staging\\acorn-e9fc9845\\README.md' },
1>npm ERR!   stack:
1>npm ERR!    "Error: EPERM: operation not permitted, unlink 'F:\\C#\\Exercises\\WebApplication5\\WebApplication5\\ClientApp\\node_modules\\.staging\\acorn-e9fc9845\\README.md'",
1>npm ERR!   errno: -4048,
1>npm ERR!   code: 'EPERM',
1>npm ERR!   syscall: 'unlink',
1>npm ERR!   path:
1>npm ERR!    'F:\\C#\\Exercises\\WebApplication5\\WebApplication5\\ClientApp\\node_modules\\.staging\\acorn-e9fc9845\\README.md',
1>npm ERR!   parent: 'WebApplication5' }
1>npm ERR!
1>npm ERR! The operation was rejected by your operating system.
1>npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
1>npm ERR! or that you lack permissions to access it.
1>npm ERR!
1>npm ERR! If you believe this might be a permissions issue, please double-check the
1>npm ERR! permissions of the file and its containing directories, or try running
1>npm ERR! the command again as root/Administrator (though this is not recommended).
1>npm WARN tarball tarball data for react-router-bootstrap@0.24.4 (sha512-kEwk3ml4wvE3IbJvRVjx0zBBBxW4JLhD0wyy0hBdlWSdfjvgoHVvlxx9gBPxvEs5VwWlbFvNRyUghLZ2AMcmzg==) seems to be corrupted. Trying one more time.

Finally, I found the answer! for the above error, first of all, you should download and install Node.js 10.13 LTS on your system. Then in the command prompt, the bellow codes must be written :

>>npm cache verify 
>>npm config rm proxy
>>npm config rm https-proxy
>>npm config set registry
>>npm config set http://registry.npmjs.org

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM