git 合并冲突后运行 npm-run 时出错

Posted

技术标签:

【中文标题】git 合并冲突后运行 npm-run 时出错【英文标题】:Getting error when running npm-run after git merging conflicts 【发布时间】:2019-11-24 01:23:21 【问题描述】:

在手动解决了一些冲突的 git 合并后运行 npm run watch/npm run dev 时出现以下错误:

/Users/Julia/sites/kickback/webpack.mix.js:19

语法错误:意外的标记

现在解决所有冲突后,我收到以下错误:

./resources/assets/sass/main.scss (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/sass-loader/lib/loader.js??ref--5-4!./resources/assets/sass/main.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
/Users/Julia/sites/kickback/tailwind.config.js:511
=======
   ^^^

SyntaxError: Unexpected token ===
    at new Script (vm.js:83:7)
    at NativeCompileCache._moduleCompile (/Users/Julia/sites/kickback/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/Users/Julia/sites/kickback/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (/Users/Julia/sites/kickback/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at /Users/Julia/sites/kickback/node_modules/tailwindcss/lib/index.js:54:83
    at /Users/Julia/sites/kickback/node_modules/tailwindcss/lib/processTailwindFeatures.js:32:20
    at LazyResult.run (/Users/Julia/sites/kickback/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:295:14)
    at LazyResult.asyncTick (/Users/Julia/sites/kickback/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:208:26)
    at LazyResult.asyncTick (/Users/Julia/sites/kickback/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:221:14)
    at /Users/Julia/sites/kickback/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:250:14
    at new Promise (<anonymous>)
    at LazyResult.async (/Users/Julia/sites/kickback/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:246:23)
    at LazyResult.then (/Users/Julia/sites/kickback/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:127:17)
    at Promise.resolve.then.then (/Users/Julia/sites/kickback/node_modules/postcss-loader/src/index.js:142:8)
 @ ./resources/assets/sass/main.scss 2:14-208

【问题讨论】:

【参考方案1】:

你还没有解决所有问题,解决所有合并问题应该没问题。

【讨论】:

以上是关于git 合并冲突后运行 npm-run 时出错的主要内容,如果未能解决你的问题,请参考以下文章

Git:如何避免在先前合并还原后合并功能分支时发生冲突

为啥 git mergetool 显示没有冲突,即使合并后文件中存在冲突标记?

解决冲突后的Xcode 9.3 Git合并问题

git分支合并为啥会发生冲突

jQgrid使用问题,我加上下面的代码集出错。

这段JS代码为啥会出错?