簡體   English   中英

為什么在 Visual Studio 2017 中運行時 React js 會產生錯誤

[英]Why React js at runtime in visual studio 2017 produce errors

為什么在 Visual Studio 2017 中運行時 React js 會產生錯誤? 大家好,我想知道為什么在我的 Visual Studio 2017 (15.8.9) 中運行 React js 時會遇到一堆錯誤並且 react js 沒有啟動! 它只是給出了以下錯誤:(另外,我還禁用了我的防病毒軟件和防火牆)

. . .

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.

終於,我找到了答案! 對於上述錯誤,首先,您應該在您的系統上下載並安裝 Node.js 10.13 LTS。 然后在命令提示符中,必須編寫以下代碼:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM