【问题标题】:TypeScript: node_modules/classnames/index.d.ts:13:13 Type alias 'Argument' circularly references itselfTypeScript:node_modules/classnames/index.d.ts:13:13 类型别名“Argument”循环引用自身
【发布时间】:2021-08-07 21:54:10
【问题描述】:

我在构建项目时收到的有关此错误的任何信息。关于如何解决此问题的在线信息不多。 我正在运行 typescript 4.2.4

我也没有任何目录中的类名/index.d.ts。所以我也无法修复文件中的任何内容。

会是安装错误版本的实例还是修复了某些逻辑?


[48:02.5]  type checking finished in 12.00 s

[ ERROR ]  TypeScript: node_modules/classnames/index.d.ts:13:13
           Type alias 'Argument' circularly references itself.

     L12:  export type Mapping = { [key: string]: any };
     L13:  export type Argument = Value | Mapping | Argument[];

[48:02.5]  build failed in 12.14 s

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jll-ipl@0.0.1 stencil:build: `stencil build --docs`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the jll-ipl@0.0.1 stencil:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/eduardo.gc/.npm/_logs/2021-05-18T15_48_02_641Z-debug.log
Rendering Complete, saving .css file...
Wrote CSS to /Users/eduardo.gc/Desktop/git/property-listings/ui.apps/src/main/content/jcr_root/etc/designs/global-property-listings/ipl.css
Wrote Source Map to /Users/eduardo.gc/Desktop/git/property-listings/ui.apps/src/main/content/jcr_root/etc/designs/global-property-listings/ipl.css.map
ERROR: "stencil:build" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jll-ipl@0.0.1 build:js: `npm-run-all stencil:build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the jll-ipl@0.0.1 build:js script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/eduardo.gc/.npm/_logs/2021-05-18T15_48_03_571Z-debug.log
ERROR: "build:js" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jll-ipl@0.0.1 build: `npm-run-all -p build:*`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the jll-ipl@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/eduardo.gc/.npm/_logs/2021-05-18T15_48_03_678Z-debug.log
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:804)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:751)
    at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:313)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

【问题讨论】:

    标签: typescript maven npm aem


    【解决方案1】:

    好像在master分支上修改了,但是还没有发布。

    https://github.com/JedWatson/classnames/blob/master/index.d.ts

    就我而言,我使用 3.8.3 时还可以。 https://devblogs.microsoft.com/typescript/announcing-typescript-3-7-rc/#more-recursive-type-aliases

    再次确认您的本地打字稿版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-15
      • 2022-08-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多