簡體   English   中英

node.js v10.0.0搞亂了gulp

[英]node.js v10.0.0 messing with gulp

我有node.js api項目在node.js v8.1.4和npm v5.0.3下工作得很好但是當我移動到node.js v10.0.0和npm v5.6.0 ,它產生了這個:

core-api@0.0.2生態系統E:\\ opensource \\ node-cheat \\ core-api gulp compile && pm2 start ecosystem.config.js | 本仁

gulp [11100]:src \\ node_contextify.cc:631:斷言args[1]->IsString()' failed. 1: node::DecodeWrite 2: node::DecodeWrite 3: uv_loop_fork 4: v8::internal::interpreter::BytecodeDecoder::Decode 5: v8::internal::RegExpImpl::Exec 6: v8::internal::RegExpImpl::Exec 7: v8::internal::RegExpImpl::Exec 8: 000000E5F6F84281 npm ERR! code ELIFECYCLE npm ERR! errno 134 npm ERR! core-api@0.0.2 ecosystem: args[1]->IsString()' failed. 1: node::DecodeWrite 2: node::DecodeWrite 3: uv_loop_fork 4: v8::internal::interpreter::BytecodeDecoder::Decode 5: v8::internal::RegExpImpl::Exec 6: v8::internal::RegExpImpl::Exec 7: v8::internal::RegExpImpl::Exec 8: 000000E5F6F84281 npm ERR! code ELIFECYCLE npm ERR! errno 134 npm ERR! core-api@0.0.2 ecosystem: args[1]->IsString()' failed. 1: node::DecodeWrite 2: node::DecodeWrite 3: uv_loop_fork 4: v8::internal::interpreter::BytecodeDecoder::Decode 5: v8::internal::RegExpImpl::Exec 6: v8::internal::RegExpImpl::Exec 7: v8::internal::RegExpImpl::Exec 8: 000000E5F6F84281 npm ERR! code ELIFECYCLE npm ERR! errno 134 npm ERR! core-api@0.0.2 ecosystem: compile && pm2 start ecosystem.config.js | bunyan` npm ERR! 退出狀態134 npm ERR! 錯誤的ERR! 在core-api@0.0.2生態系統腳本中失敗。 錯誤的ERR! 這可能不是npm的問題。 上面可能有額外的日志記錄輸出。

錯誤的ERR! 可以在以下位置找到此運行的完整日志:npm ERR!
C:\\ Users \\用戶zeeshan \\應用程序數據\\漫游\\ NPM-cache_logs \\ 2018-05-06T11_29_32_241Z-的debug.log

怎么修這個?

好吧,許多Github Link已經面臨這個問題

解決方案1:

npm更新

npm重建

解決方案2:

刪除node_modulespackage-lock.json

我是誰

更新:對我來說,以后工作順利。

升級你的Gulp - 節點10(升級到Gulp 4)

刪除計算機上全局安裝的現有Gulp版本

npm rm -g gulp

然后,全局安裝新的Gulp CLI包,如下所示

npm install -g gulp-cli

繼續使用以下命令在本地安裝Gulp 4到您的項目文件夾

npm install --save-dev gulp @ next

在Gulp.js 4中,gulp.task('name',['xq','x2']); 代碼應轉換如下

gulp.task('default',gulp.series('sass','imagemin'));

// 要么

並行如下gulp.task('default',gulp.parallel('sass','imagemin'));

資料來源: https//davidsekar.com/nodejs/upgrading-your-gulp-for-running-with-node-v10

暫無
暫無

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

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