【问题标题】:i getting error while npm run dev its not complaine我在 npm run dev 它没有抱怨时遇到错误
【发布时间】:2021-04-16 16:32:41
【问题描述】:
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

Buffer、TypedArray 或 DataView 的实例。收到未定义

    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

我试试 npm chache clean --force rm -rf 节点模块 npm 安装 npm 运行开发

这不起作用 我的项目在 laravel 8 上 使用 ui^3.0 Vue--认证 我也进行了全新安装,但也不起作用 我的另一个使用 jetstream 的项目:livewire npm 工作得很好 sry 拼写错误

【问题讨论】:

    标签: node.js npm webpack compiler-errors node-modules


    【解决方案1】:

    我遇到了这个问题,不得不更改我的 package.json。它看起来像:

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

    但在我将其更改为:

    "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"
        },
    

    我注意到这个错误只在我在 webpack.mix.js 中使用 mix.sass() 时出现。

    【讨论】:

      猜你喜欢
      • 2019-01-09
      • 1970-01-01
      • 1970-01-01
      • 2018-07-16
      • 2018-02-26
      • 1970-01-01
      • 2021-12-02
      • 2018-12-12
      • 2021-04-11
      相关资源
      最近更新 更多