标签: build

Next.js 构建中必需的文件

我编写了一个 Next.js 应用程序,即将部署。我想知道在保持 SSR 的同时复制到服务器上部署的严格必要的文件是什么(不是使用 静态生成的next export):

  • 只是.next/文件夹?
  • 节点模块也是如此吗?
  • 有源代码吗?

build web-deployment next.js

1
推荐指数
1
解决办法
1488
查看次数

如何设置相对路径以使用 Python 3 在 PyInstaller 中构建可移植的 .exe?

我到处查找,但对一个相当琐碎的问题没有得到明确的答复。

我在 Windows 7 上的 PyCharm 中有一个 Python 项目,其中包含多个.py文件(通过“”连接from %package_name%.%script_name% import %class_name%)和项目内的一个文件夹,其中包含两个简单的文本文件。我已将 PyInstaller 3.6 安装到项目中venv并将其用作指向.spec文件的外部工具。到目前为止,一切都很好。文件.spec内容如下:

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['C:\\Users\\%username%\\PycharmProjects\\%project_folder%\\%project_folder%\\main.py'],
             pathex=['C:\\Users\\%username%\\PycharmProjects\\%project_folder%\\%project_folder%'],
             binaries=[],
             datas=[('txt_files\\file1.txt', '.'), ('txt_files\\file2.txt', '.')],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
a.datas += [
    ("C:\\Users\\%username%\\PycharmProjects\\%project_folder%\\%project_folder%\\txt_files\\file1.txt","txt_files\\file1.txt","DATA"),
    ("C:\\Users\\%username%\\PycharmProjects\\%project_folder%\\%project_folder%\\txt_files\\file2.txt","txt_files\\file2.txt","DATA"),
]
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          [],
          exclude_binaries=True,
          name='%project_name%',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          console=True )
coll = COLLECT(exe, …
Run Code Online (Sandbox Code Playgroud)

python exe build pyinstaller

1
推荐指数
1
解决办法
5925
查看次数

Unity 脚本在编辑器中工作正常,但在构建中却不行

我是 Unity 的新手。我最近创建了一个脚本,该脚本可以禁用场景中的按钮,直到满足条件(对于关卡选择菜单,禁用所有关卡,直到玩家完成之前的关卡)但问题是 - 当我在Editor

中运行游戏时,我的脚本工作正常,但是当我构建然后运行游戏时,脚本无法 *正确工作* 。

这是该脚本 -

// Import required Modules

public class ButtonGatherer : MonoBehaviour
{
    public List<Button> buttons;
    public static int OpenLevels;
    void Start()
    {   if (OpenLevels == 0){
        OpenLevels = int.Parse(File.ReadAllText(Application.persistentDataPath + "Data.gokartgo"));} //Reads Data from a file

        GameObject[] btn = GameObject.FindGameObjectsWithTag("button");
        for (int i = 0; i < btn.Length; i++){
            buttons.Add(btn[i].GetComponent<Button>());
        }
        Debug.Log("Variable OpenLevels : "+OpenLevels);
        for(int i = OpenLevels; i < buttons.Count; i++) { 
            buttons[i].interactable …
Run Code Online (Sandbox Code Playgroud)

c# build unity-game-engine

1
推荐指数
1
解决办法
3567
查看次数

gradle kotlin DSL 扩展自

我该如何重新表述:

testCompile.extendsFrom compileOnly
Run Code Online (Sandbox Code Playgroud)

Gradle Groovy DSL 与其基于 Kotlin 的等效项?

configurations {
        testCompile{
            extendsFrom(compileOnly)
        }
    }
Run Code Online (Sandbox Code Playgroud)

我上面的方法失败了。

build gradle kotlin gradle-kotlin-dsl kotlin-dsl

1
推荐指数
1
解决办法
2595
查看次数

Angular Tree 组件构建失败,并显示消息“没有导出的成员‘可取消’”

我在项目中使用Angular Tree 组件,在过去的几天里,我在构建 Angular 应用程序时遇到以下错误。经过一番平静的斗争,问题得到了解决。我在下面为社区发布我的答案。

2020-09-02T13:10:19.5809754Z ERROR in node_modules/angular-tree-component/dist/components/tree-viewport.component.d.ts(3,10): error TS2305: Module '"D:/eb/A3322/work/2/s/node_modules/@types/lodash/index"' has no exported member 'Cancelable'.
2020-09-02T13:10:19.5810790Z 
2020-09-02T13:10:19.7050898Z npm ERR! code ELIFECYCLE
2020-09-02T13:10:19.7053154Z npm ERR! errno 1
Run Code Online (Sandbox Code Playgroud)

build angular angular-tree-component

1
推荐指数
1
解决办法
3406
查看次数

从 api 将参数传递给 devops 构建管道

我无法理解我需要做什么...但我有一个构建管道...下面是我用于测试的基本脚本。
我希望能够通过 api 和 powershell 添加/更新参数。我不确定这是否是实现此目的的最佳方法,但当我手动添加参数时,它似乎运行良好。当我传递参数时,它不会粘住。任何帮助将不胜感激......即使我应该在其他地方发布我的查询。谢谢

  1. 管道脚本

     variables:
        patchgroup: test
    
     jobs: 
     - template: patch-template.yml  
    
       parameters:    
         patchgroup: $(patchgroup)    
         sqlservers:      
           - sqlserver: name: ""
    
    Run Code Online (Sandbox Code Playgroud)
  2. 补丁模板文件

    parameters:
      sqlservers: {}
      patchgroup: ''
    
    jobs:
    - ${{ each sqlserver in parameters.sqlservers }}:
      - template: patch-tasks.yml
        parameters:
          sqlserver: ${{ sqlserver.name }}
          patchgroup: ${{ parameters.patchgroup }}
    
    Run Code Online (Sandbox Code Playgroud)
  3. 补丁任务参数:sqlserver: '' patchgroup: ''

     jobs:
       - job: 
         displayName: '${{ parameters.sqlserver }}--set-up-stuff'
         steps:
         - task: PowerShell@2
           inputs:
             targetType: 'inline'
             script: |
               Write-Host "Patchgroup '${{ parameters.patchgroup }}'"
               Write-Host "sqlserver '${{ parameters.sqlserver }}'"
    
    Run Code Online (Sandbox Code Playgroud)
  4. powershell脚本

     $defurl …
    Run Code Online (Sandbox Code Playgroud)

api powershell build devops azure-pipelines

1
推荐指数
1
解决办法
2609
查看次数

android() 方法的签名不适用于参数类型

我已经尝试了网络上给出的所有解决方案,但没有任何效果。请尽快提供帮助。同步错误:

构建文件'C:\ Users \ AH_GL \ Desktop \ apps-android-commons \ app \ build.gradle'行:149

评估项目“:app”时出现问题。

无方法签名:build_bacf6ncg9oj63qiyhi1id1rfi.android() 适用于参数类型:(build_bacf6ncg9oj63qiyhi1id1rfi$_run_closure2) 值:[build_bacf6ncg9oj63qiyhi1id1rfi$_run_closure2@733e2c45]

构建.gradle(:应用程序)

plugins {
    id 'com.github.triplet.play' version '2.7.2' apply false
}
apply from: '../gitutils.gradle'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: "com.hiya.jacoco-android"
apply from: 'quality.gradle'

def isRunningOnTravisAndIsNotPRBuild = System.getenv("CI") == "true" && file('../play.p12').exists()

if (isRunningOnTravisAndIsNotPRBuild) {
    apply plugin: 'com.github.triplet.play'
}

dependencies {

    implementation project(':wikimedia-data-client')
    // Utils
    implementation 'in.yuvi:http.fluent:1.3'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation ("com.squareup.okhttp3:okhttp:$OKHTTP_VERSION"){
        force = true //API 19 …
Run Code Online (Sandbox Code Playgroud)

build gradle kotlin android-studio android-gradle-plugin

1
推荐指数
1
解决办法
8556
查看次数

如何创建可执行文件来运行给定 PTX 文件中的内核?

据我所知,你需要一个主机代码(对于CPU)和一个设备代码(对于GPU),没有它们你就无法在GPU上运行某些东西。

我正在学习 PTX ISA,但不知道如何在 Windows 上执行它。我是否需要 .cu 文件来运行它,或者是否有其他方法来运行它?

cuda build ptx

1
推荐指数
1
解决办法
1297
查看次数

无法在真实 ios 设备上以调试模式运行 flutter 应用

我从 2.2.3 升级到 flutter 2.5。然后我又把它恢复到2.2.3版本。之后,我无法在真正的 ios 手机上启动调试 mod,卡在安装和启动上。删除 flutter 缓存并清除 flutter 没有帮助。

[VERBOSE-2:shell.cc(93)] Dart Error: Can't load Kernel binary: Invalid kernel binary format version.
[VERBOSE-2:dart_isolate.cc(170)] Could not prepare isolate.
[VERBOSE-2:runtime_controller.cc(382)] Could not create root isolate.
[VERBOSE-2:shell.cc(576)] Could not launch engine with configuration.
Run Code Online (Sandbox Code Playgroud)

build ios flutter

1
推荐指数
1
解决办法
1万
查看次数

错误:任务“:app:generateDebugBuildConfig”执行失败

所以我尝试使用 flutter_downloader 包使用给定的 URL 下载文件下面是我的实现,

void main() async {
 WidgetsFlutterBinding.ensureInitialized();
  await FlutterDownloader.initialize(
    debug: true // optional: set false to disable printing logs to console
   );
   runApp(new MaterialApp(
   home: new MyApp(),
   ));
 }

 class MyApp extends StatefulWidget {
  @override
  _State createState() => new _State();
  }

  class _State extends State<MyApp> {
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        appBar: new AppBar(title: Text('Template Code'),backgroundColor: 
         Colors.green,),
        body: Container(
         padding: EdgeInsets.all(50.0),
          child: Center(child:Column(
          children: <Widget> [
           Text('Hello World'),
            RaisedButton(onPressed: () async {
              final status …
Run Code Online (Sandbox Code Playgroud)

exception build dart flutter

1
推荐指数
1
解决办法
5378
查看次数