小_柒
小_柒
  • 发布:2020-07-21 10:49
  • 更新:2020-07-21 20:32
  • 阅读:1911

执行 rarn 报错,但是在微信开发者工具可以正常运行,求大佬指点一下

分类:uni-app
[1/4] Resolving packages...  
[2/4] Fetching packages...  
info fsevents@2.1.3: The platform "win32" is incompatible with this module.  
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.  
info fsevents@1.2.12: The platform "win32" is incompatible with this module.  
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.  
[3/4] Linking dependencies...  
warning "@typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".  
warning " > sass-loader@7.3.1" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".  
warning "@dcloudio/vue-cli-plugin-uni > copy-webpack-plugin@5.1.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".  
warning "@vue/eslint-config-standard > eslint-import-resolver-webpack@0.12.1" has unmet peer dependency "webpack@>=1.11.0".  
[4/4] Building fresh packages...  
[1/5] ⢀ node-sass  
[1/5] ⠂ node-sass  
[-/5] ⠂ waiting...  
[3/5] ⠄ yorkie  
[-/5] ⠄ waiting...  
error E:\uniapp\TinyShop\node_modules\node-sass: Command failed.  
Exit code: 1  
Command: node scripts/build.js  
Arguments:  
Directory: E:\uniapp\TinyShop\node_modules\node-sass  
Output:  
Building: D:\Program Files\nodejs\node.exe E:\uniapp\TinyShop\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=  
gyp info it worked if it ends with ok  
gyp verb cli [  
gyp verb cli   'D:\\Program Files\\nodejs\\node.exe',  
gyp verb cli   'E:\\uniapp\\TinyShop\\node_modules\\node-gyp\\bin\\node-gyp.js',  
gyp verb cli   'rebuild',  
gyp verb cli   '--verbose',  
gyp verb cli   '--libsass_ext=',  
gyp verb cli   '--libsass_cflags=',  
gyp verb cli   '--libsass_ldflags=',  
gyp verb cli   '--libsass_library='  
gyp verb cli ]  
gyp info using node-gyp@3.8.0  
gyp info using node@14.5.0 | win32 | x64  
gyp verb command rebuild []  
gyp verb command clean []  
gyp verb clean removing "build" directory  
gyp verb command configure []  
gyp verb download using dist-url https://npm.taobao.org/dist  
gyp verb check python checking for Python executable "python2" in the PATH  
gyp verb `which` failed Error: not found: python2  
gyp verb `which` failed     at getNotFoundError (E:\uniapp\TinyShop\node_modules\which\which.js:13:12)  
gyp verb `which` failed     at F (E:\uniapp\TinyShop\node_modules\which\which.js:68:19)  
gyp verb `which` failed     at E (E:\uniapp\TinyShop\node_modules\which\which.js:80:29)  
gyp verb `which` failed     at E:\uniapp\TinyShop\node_modules\which\which.js:89:16  
gyp verb `which` failed     at E:\uniapp\TinyShop\node_modules\isexe\index.js:42:5  
gyp verb `which` failed     at E:\uniapp\TinyShop\node_modules\isexe\windows.js:36:5  
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:176:21)  
gyp verb `which` failed  python2 Error: not found: python2  
gyp verb `which` failed     at getNotFoundError (E:\uniapp\TinyShop\node_modules\which\which.js:13:12)  
gyp verb `which` failed     at F (E:\uniapp\TinyShop\node_modules\which\which.js:68:19)  
gyp verb `which` failed     at E (E:\uniapp\TinyShop\node_modules\which\which.js:80:29)  
gyp verb `which` failed     at E:\uniapp\TinyShop\node_modules\which\which.js:89:16  
gyp verb `which` failed     at E:\uniapp\TinyShop\node_modules\isexe\index.js:42:5  
gyp verb `which` failed     at E:\uniapp\TinyShop\node_modules\isexe\windows.js:36:5  
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:176:21) {  
gyp verb `which` failed   code: 'ENOENT'  
gyp verb `which` failed }  
gyp verb check python checking for Python executable "python" in the PATH  
gyp verb `which` succeeded python C:\Users\xiaoh\AppData\Local\Programs\Python\Python38-32\python.EXE  
gyp ERR! configure error  
gyp ERR! stack Error: Command failed: C:\Users\xiaoh\AppData\Local\Programs\Python\Python38-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];  
gyp ERR! stack   File "<string>", line 1  
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];  
gyp ERR! stack                       ^  
gyp ERR! stack SyntaxError: invalid syntax  
gyp ERR! stack  
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:308:12)  
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)  
gyp ERR! stack     at maybeClose (internal/child_process.js:1051:16)  
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)  
gyp ERR! System Windows_NT 10.0.19041  
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "E:\\uniapp\\TinyShop\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="  
gyp ERR! cwd E:\uniapp\TinyShop\node_modules\node-sass  
gyp ERR! node -v v14.5.0

2020-07-21 10:49 负责人:无 分享
已邀请:
RageFrame2

RageFrame2 - 开源使我快乐

运行没问题 是打包出错吗?

小_柒

小_柒 (作者)

感谢大佬回复。我还没打包呢,刚从 git clone 到本地,然后执行 yarn 就出现这些错误了。

RageFrame2

RageFrame2 - 开源使我快乐

那可能就是node版本有问题或者跟你本地的依赖有冲突

  • 小_柒 (作者)

    那怎么处理呢?对 node 版本有要求?

    2020-07-21 11:58

RageFrame2

RageFrame2 - 开源使我快乐

如果命令行不能运行 可自行看报错解决 也可使用HBuilderX进行运行或打包

  • 小_柒 (作者)

    用 HBuilderX 运行正常,发现一些小 BUG,广告管理设置不显示标题好像不生效,基础设置里关闭首页顶部分类不生效

    2020-07-21 14:23

RageFrame2

RageFrame2 - 开源使我快乐

开源版有点功能的小阉割 不过业务逻辑都保留了 可以在前端的/src/config/setting.config.js 里面配置一下 你会发现新大陆的~

  • 小_柒 (作者)

    谢谢大佬,开源不易,太感谢了!还有一个问题,我本地测试走了一遍流程,好像优惠券不能使用。场景是:我领取了一张优惠券,在使用期内,然后下单付款选择优惠券时显示没有优惠券。

    2020-07-23 06:02

  • RageFrame2

    回复 小_柒: 下单时优惠券是有后端返回的 后端只会返回可用优惠券 一是特殊的商品不能使用优惠券 还有不满足金额也不能使用优惠券

    2020-07-23 11:35

  • 小_柒 (作者)

    回复 RageFrame2: 好的,谢谢大佬回复,我再确认下是不是优惠券条件不满足的原因

    2020-07-24 06:06

该问题目前已经被锁定, 无法添加新回复