当我尝试在Angular CLI 1.3.1中安装 bootstrap 4 beta 时,这只是用于尝试一些CSS相关内容的全新安装。
即使我以管理员身份运行命令,也会出现波纹管错误。
[已更新] 用调试信息替换了屏幕截图
这是npm调试信息
0 info it worked if it ends with ok
1 verbose cli [ 'F:\\Programming\\JS\\Nodejs8\\node.exe',
1 verbose cli 'C:\\Users\\Viraj\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'bootstrap@4.0.0-beta' ]
2 info using npm@5.4.0
3 info using node@v8.4.0
4 verbose npm-session 75609d81f090ff57
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/bootstrap 1977ms (from cache)
8 silly pacote version manifest for bootstrap@4.0.0-beta fetched in 3321ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule bootstrap@4.0.0-beta checking installable status
14 http fetch GET 304 https://registry.npmjs.org/fsevents 572ms (from cache)
15 silly pacote range manifest for fsevents@^1.0.0 fetched in 650ms
16 silly resolveWithNewModule fsevents@1.1.2 checking installable status
17 silly pacote trying https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz by hash: sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==
18 silly pacote https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz extracted to C:\Users\Viraj\AppData\Local\Temp\npm-9612-98a2724c\unpack-ed2bd6af by content address 17058ms
-- deleted someline to fit in stackoverflow----
1015 silly decomposeActions unbuild fsevents
1016 silly decomposeActions remove fsevents
1017 silly decomposeActions fetch fsevents@1.1.2
1018 silly decomposeActions extract fsevents@1.1.2
1019 silly decomposeActions preinstall fsevents@1.1.2
1020 silly decomposeActions build fsevents@1.1.2
1021 silly decomposeActions install fsevents@1.1.2
1022 silly decomposeActions postinstall fsevents@1.1.2
1023 silly decomposeActions finalize fsevents@1.1.2
1024 silly decomposeActions refresh-package-json fsevents@1.1.2
1025 silly decomposeActions unbuild bootstrap@4.0.0-beta
1026 silly decomposeActions remove bootstrap@4.0.0-beta
1027 silly decomposeActions fetch bootstrap@4.0.0-beta
1028 silly decomposeActions extract bootstrap@4.0.0-beta
1029 silly decomposeActions preinstall bootstrap@4.0.0-beta
1030 silly decomposeActions build bootstrap@4.0.0-beta
1031 silly decomposeActions install bootstrap@4.0.0-beta
1032 silly decomposeActions postinstall bootstrap@4.0.0-beta
1033 silly decomposeActions finalize bootstrap@4.0.0-beta
1034 silly decomposeActions refresh-package-json bootstrap@4.0.0-beta
1035 silly install executeActions
1036 silly doSerial global-install 894
1037 verbose correctMkdir C:\Users\Viraj\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
1038 verbose lock using C:\Users\Viraj\AppData\Roaming\npm-cache\_locks\staging-8779bf6cfde4176a.lock for F:\Projects\CSS\FlexBox\flexBox\node_modules\.staging
1039 silly doParallel extract 894
1040 silly extract fsevents@1.1.2
1041 silly pacote trying fsevents@https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz by hash: sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==
1042 silly extract bootstrap@4.0.0-beta
1043 silly pacote trying bootstrap@https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0-beta.tgz by hash: sha512-I/r3fYtUZr+rUNkh8HI+twxZ56p6ehNn27eA1XSebLVQKAJ2xZHnEvZrSR+UR2A/bONcd9gHC3xatVhQlH6R6w==
1044 silly pacote bootstrap@https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0-beta.tgz extracted to F:\Projects\CSS\FlexBox\flexBox\node_modules\.staging\bootstrap-6d9b8e3a by content address 5060ms
1045 silly pacote fsevents@https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz extracted to F:\Projects\CSS\FlexBox\flexBox\node_modules\.staging\fsevents-1488e69a by content address 16992ms
1046 silly doReverseSerial unbuild 894
1047 silly unbuild bootstrap@4.0.0-beta
1048 info lifecycle bootstrap@4.0.0-beta~preuninstall: bootstrap@4.0.0-beta
1049 info lifecycle bootstrap@4.0.0-beta~uninstall: bootstrap@4.0.0-beta
1050 verbose unbuild rmStuff bootstrap@4.0.0-beta from F:\Projects\CSS\FlexBox\flexBox\node_modules
1051 info lifecycle bootstrap@4.0.0-beta~postuninstall: bootstrap@4.0.0-beta
-- deleted someline to fit in stackoverflow----
1568 silly doParallel preinstall 894
1569 silly preinstall bootstrap@4.0.0-beta
1570 info lifecycle bootstrap@4.0.0-beta~preinstall: bootstrap@4.0.0-beta
1571 silly doSerial build 894
1572 silly build bootstrap@4.0.0-beta
1573 info linkStuff bootstrap@4.0.0-beta
1574 silly linkStuff bootstrap@4.0.0-beta has F:\Projects\CSS\FlexBox\flexBox\node_modules as its parent node_modules
1575 verbose linkBins bootstrap@4.0.0-beta
1576 verbose linkMans bootstrap@4.0.0-beta
1577 silly doSerial global-link 894
1578 silly doParallel update-linked 894
1579 silly doSerial install 894
1580 silly install bootstrap@4.0.0-beta
1581 info lifecycle bootstrap@4.0.0-beta~install: bootstrap@4.0.0-beta
1582 silly doSerial postinstall 894
1583 silly postinstall bootstrap@4.0.0-beta
1584 info lifecycle bootstrap@4.0.0-beta~postinstall: bootstrap@4.0.0-beta
1585 verbose unlock done using C:\Users\Viraj\AppData\Roaming\npm-cache\_locks\staging-8779bf6cfde4176a.lock for F:\Projects\CSS\FlexBox\flexBox\node_modules\.staging
1586 verbose stack Error: EPERM: operation not permitted, unlink 'F:\Projects\CSS\FlexBox\flexBox\node_modules\fsevents\node_modules\abbrev\package.json'
1587 verbose cwd F:\Projects\CSS\FlexBox\flexBox
1588 verbose Windows_NT 10.0.15063
1589 verbose argv "F:\\Programming\\JS\\Nodejs8\\node.exe" "C:\\Users\\Viraj\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "bootstrap@4.0.0-beta"
1590 verbose node v8.4.0
1591 verbose npm v5.4.0
1592 error path F:\Projects\CSS\FlexBox\flexBox\node_modules\fsevents\node_modules\abbrev\package.json
1593 error code EPERM
1594 error errno -4048
1595 error syscall unlink
1596 error Error: EPERM: operation not permitted, unlink 'F:\Projects\CSS\FlexBox\flexBox\node_modules\fsevents\node_modules\abbrev\package.json'
1596 error { Error: EPERM: operation not permitted, unlink 'F:\Projects\CSS\FlexBox\flexBox\node_modules\fsevents\node_modules\abbrev\package.json'
1596 error stack: 'Error: EPERM: operation not permitted, unlink \'F:\\Projects\\CSS\\FlexBox\\flexBox\\node_modules\\fsevents\\node_modules\\abbrev\\package.json\'',
1596 error errno: -4048,
1596 error code: 'EPERM',
1596 error syscall: 'unlink',
1596 error path: 'F:\\Projects\\CSS\\FlexBox\\flexBox\\node_modules\\fsevents\\node_modules\\abbrev\\package.json' }
1597 error Please try running this command again as root/Administrator.
1598 verbose exit [ -4048, true ]
这是我的NPM信息
node version is 8.4.0
npm version is 5.4
OS Architecture 64 bit
OS Windows 10 Pro
由于 如果您需要更多信息,请与我们联系。
答案 0 :(得分:1)
我们可以读错误本身:
请尝试以root / Administrator
再次运行此命令
要执行此操作,请右键单击Windows菜单图标(通常是左下角),而不是选择命令行,选择命令行(管理员)。请注意,确切的措辞可能有所不同,我没有使用英文版。
似乎还有其他一些人有同样的问题。请查看找到的任何解决方案here是否有帮助。
总结繁荣的解决方案: