每当我尝试执行npm install
来构建项目中的react
部分时,我都会尝试。
它将引发以下错误:
*module.js:472
throw err;
^
Error: Cannot find module 'webpack/lib/removeAndDo'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\CHUBB\Sourcecode_claimyno_svn\denuncia-claimy\src\main\webapp\js\appReact\node_modules\extract-text-webpack-plugin\ExtractedModule.js:30:42)*
我的反应部分有什么问题,什么可能是解决方案。
答案 0 :(得分:1)
尝试:
// A list containing the different hairstyles
public List<BitmapImage> Hairstyles = new List<BitmapImage>();
// Index of the current hairstyle
public int CurrentHairstyle;
// When right arrow is clicked
public void ButtonRightPress(object sender, EventArgs e) {
// Move to the next hairstyle in the list
CurrentHairstyle += 1;
// Loop back to the start if we're at the list's end
if (CurrentHairstyle > Hairstyles.Count - 1) {
CurrentHairstyle = 0;
}
// Make our PictureBox display the new currently selected hairstyle.
PictureBox.Image = Hairstyles[CurrentHairstyle];
}
// When left arrow is clicked
public void ButtonLeftPress(object sender, EventArgs e) {
// Move to the previous hairstyle in the list
CurrentHairstyle -= 1;
// Loop forward to the end if we hit the list's beginning
if (CurrentHairstyle < 0) {
CurrentHairstyle = Hairstyles.Count - 1;
}
// Make our PictureBox display the new currently selected hairstyle.
PictureBox.Image = Hairstyles[CurrentHairstyle];
}
答案 1 :(得分:0)
您必须清理npm缓存:
$ rm -rf node_modules/
$ npm cache clean --force
$ npm i