简体   繁体   English

我在 npm 运行开发时遇到错误,它没有抱怨

[英]i getting error while npm run dev its not complaine

87% sealing module hashinginternal/crypto/hash.js:84
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or

an instance of Buffer, TypedArray, or DataView. Buffer、TypedArray 或 DataView 的实例。 Received undefined收到未定义

    at Hash.update (internal/crypto/hash.js:84:11)re
    at BulkUpdateDecorator.update (C:\Users\#root\OneDrive\Desktop\restaurant\no
de_modules\webpack\lib\util\createHash.js:49:14)
    at NormalModule.updateHash (C:\Users\#root\OneDrive\Desktop\restaurant\node_
modules\webpack\lib\NormalModule.js:1115:8)
    at Compilation.createModuleHashes (C:\Users\#root\OneDrive\Desktop\restauran
t\node_modules\webpack\lib\Compilation.js:2817:12)
    at C:\Users\#root\OneDrive\Desktop\restaurant\node_modules\webpack\lib\Compi
lation.js:2155:11
    at Hook.eval [as callAsync] (eval at create (C:\Users\#root\OneDrive\Desktop
\restaurant\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1
)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\#root\OneDrive\Desktop
\restaurant\node_modules\tapable\lib\Hook.js:18:14)
    at C:\Users\#root\OneDrive\Desktop\restaurant\node_modules\webpack\lib\Compi
lation.js:2115:36
    at Hook.eval [as callAsync] (eval at create (C:\Users\#root\OneDrive\Desktop
\restaurant\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1
)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\#root\OneDrive\Desktop
\restaurant\node_modules\tapable\lib\Hook.js:18:14) {
  code: 'ERR_INVALID_ARG_TYPE'
}
npm ERR! code 1
npm ERR! path C:\Users\#root\OneDrive\Desktop\restaurant
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c webpack --progress --confi
g=C:\\Users\\#root\\OneDrive\\Desktop\\restaurant\\node_modules\\laravel-mix\\se
tup\\webpack.config.js

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\#root\AppData\Local\npm-cache\_logs\2021-01-11T16_06_38_59
9Z-debug.log
npm ERR! code 1
npm ERR! path C:\Users\#root\OneDrive\Desktop\restaurant
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c mix

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\#root\AppData\Local\npm-cache\_logs\2021-01-11T16_06_39_65
1Z-debug.log
npm ERR! code 1
npm ERR! path C:\Users\#root\OneDrive\Desktop\restaurant
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npm run development

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\#root\AppData\Local\npm-cache\_logs\2021-01-11T16_06_39_93
3Z-debug.log

i try npm chache clean --force rm -rf node_modules npm install npm run dev我尝试 npm chache clean --force rm -rf node_modules npm 安装 npm 运行开发

this not working my project is on laravel 8 using ui^3.0 vue--auth and i do fresh installing too but does'nt work too my another procject using jetstream:livewire npm working just fine sry spelling misktake这不起作用我的项目是在 laravel 8 上使用 ui^3.0 vue--auth,我也进行了全新安装,但我的另一个使用 jetstream 的项目也不起作用:livewire npm 工作得很好,对不起拼写错误

I had this issue and had to change my package.json.我遇到了这个问题,不得不改变我的 package.json。 It looked like:它看起来像:

"devDependencies": {
        "axios": "^0.21",
        "laravel-mix": "^6.0.6",
        "lodash": "^4.17.19",
        "postcss": "^8.1.14"
    },

But worked after I changed it to:但是在我将其更改为:

"devDependencies": {
        "axios": "^0.21",
        "laravel-mix": "^6.0.6",
        "lodash": "^4.17.19",
        "postcss": "^8.1.14",
        "sass-loader": "^10.1.1",
        "resolve-url-loader": "^3.1.2"
    },

I noticed that this error only came up when I used mix.sass() in webpack.mix.js.我注意到只有在 webpack.mix.js 中使用mix.sass()时才会出现此错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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