yuanqing / create-figma-plugin

:battery: The comprehensive toolkit for developing plugins and widgets for Figma and FigJam
https://yuanqing.github.io/create-figma-plugin/
MIT License
948 stars 91 forks source link

Build fails #198

Closed Antonytm closed 4 weeks ago

Antonytm commented 1 year ago

Branch: main Node: v18.16.1 NPM: 9.5.1

I run npm install Expected result: NPM packages should be installed Actual result: NPM packages are installed with warnings, NPM install forces build, which fails.

PS C:\source\create-figma-plugin-origin> npm i
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: stylelint-order@5.0.0
npm WARN Found: stylelint@15.10.2
npm WARN node_modules/stylelint
npm WARN   dev stylelint@"^15.10.2" from the root project
npm WARN   6 more (stylelint-config-idiomatic-order, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer stylelint@"^14.0.0" from stylelint-order@5.0.0
npm WARN node_modules/stylelint-config-idiomatic-order/node_modules/stylelint-order
npm WARN   stylelint-order@"^5.0.0" from stylelint-config-idiomatic-order@9.0.0
npm WARN   node_modules/stylelint-config-idiomatic-order
npm WARN 
npm WARN Conflicting peer dependency: stylelint@14.16.1
npm WARN node_modules/stylelint
npm WARN   peer stylelint@"^14.0.0" from stylelint-order@5.0.0
npm WARN   node_modules/stylelint-config-idiomatic-order/node_modules/stylelint-order
npm WARN     stylelint-order@"^5.0.0" from stylelint-config-idiomatic-order@9.0.0
npm WARN     node_modules/stylelint-config-idiomatic-order
(node:321656) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)

> postinstall
> simple-git-hooks && tsx scripts/patch-figma-plugin-typings.ts && npm run build

[INFO] Successfully set the pre-commit with command: npx lint-staged
[INFO] Successfully set the pre-push with command: npx turbo run fix lint test build
[INFO] Successfully set all git hooks

> build
> turbo run build

• Packages in scope: @create-figma-plugin/build, @create-figma-plugin/common, @create-figma-plugin/tsconfig, @create-figma-plugin/ui, @create-figma-plugin/utilities, create-figma-plugin, website
• Running build in 7 packages
• Remote caching disabled
@create-figma-plugin/common:build: cache miss, executing f3bd0fe554a72121   
@create-figma-plugin/utilities:build: cache miss, executing 5530946d04413b04
@create-figma-plugin/common:build: 
@create-figma-plugin/common:build: > @create-figma-plugin/common@2.6.1 prebuild      
@create-figma-plugin/common:build: > npm run clean
@create-figma-plugin/common:build: 
@create-figma-plugin/utilities:build: 
@create-figma-plugin/utilities:build: > @create-figma-plugin/utilities@2.6.1 prebuild
@create-figma-plugin/utilities:build: > npm run clean
@create-figma-plugin/utilities:build: 
@create-figma-plugin/utilities:build: 
@create-figma-plugin/utilities:build: > @create-figma-plugin/utilities@2.6.1 clean    
@create-figma-plugin/utilities:build: > rimraf --glob '*.log' lib tsconfig.tsbuildinfo
@create-figma-plugin/utilities:build: 
@create-figma-plugin/common:build: 
@create-figma-plugin/common:build: > @create-figma-plugin/common@2.6.1 clean
@create-figma-plugin/common:build: > rimraf --glob '*.log' lib tsconfig.tsbuildinfo   
@create-figma-plugin/common:build: 
@create-figma-plugin/utilities:build: 
@create-figma-plugin/utilities:build: > @create-figma-plugin/utilities@2.6.1 build
@create-figma-plugin/utilities:build: > npm run build:interpolate-gumroad-script && npm run build:generate-index && npm run build:js && npm run build:generate-docs
@create-figma-plugin/utilities:build: 
@create-figma-plugin/common:build: 
@create-figma-plugin/common:build: > @create-figma-plugin/common@2.6.1 build
@create-figma-plugin/common:build: > npm run build:generate-index && npm run build:js
@create-figma-plugin/common:build: 
@create-figma-plugin/utilities:build: 
@create-figma-plugin/utilities:build: > @create-figma-plugin/utilities@2.6.1 build:interpolate-gumroad-script
@create-figma-plugin/utilities:build: > tsx scripts/interpolate-gumroad-script.ts
@create-figma-plugin/utilities:build: 
@create-figma-plugin/common:build: 
@create-figma-plugin/common:build: > @create-figma-plugin/common@2.6.1 build:generate-index
@create-figma-plugin/common:build: > rimraf src/index.ts && tsx ../../scripts/generate-index.ts -- 'src/**/*.ts' '!src/**/private/**/*' && eslint --fix src/index.ts
@create-figma-plugin/common:build: 
@create-figma-plugin/utilities:build: 
@create-figma-plugin/utilities:build: > @create-figma-plugin/utilities@2.6.1 build:generate-index
@create-figma-plugin/utilities:build: > rimraf src/index.ts && tsx ../../scripts/generate-index.ts -- 'src/**/*.ts' '!src/**/private/**/*' && eslint --fix src/index.ts
@create-figma-plugin/utilities:build: 
@create-figma-plugin/common:build: 
@create-figma-plugin/common:build: > @create-figma-plugin/common@2.6.1 build:js
@create-figma-plugin/common:build: > tsc --build
@create-figma-plugin/common:build: 
@create-figma-plugin/utilities:build: 
@create-figma-plugin/utilities:build: > @create-figma-plugin/utilities@2.6.1 build:js
@create-figma-plugin/utilities:build: > tsc --build
@create-figma-plugin/utilities:build: 
create-figma-plugin:build: cache miss, executing 804f275c6e4852da
create-figma-plugin:build: 
create-figma-plugin:build: > create-figma-plugin@2.6.1 prebuild
create-figma-plugin:build: > npm run clean
create-figma-plugin:build: 
@create-figma-plugin/utilities:build: 
@create-figma-plugin/utilities:build: > @create-figma-plugin/utilities@2.6.1 build:generate-docs
@create-figma-plugin/utilities:build: > tsx scripts/generate-docs.ts '../website/docs/utilities.md'
@create-figma-plugin/utilities:build: 
create-figma-plugin:build: 
create-figma-plugin:build: > create-figma-plugin@2.6.1 clean
create-figma-plugin:build: > rimraf --glob '*.log' lib tsconfig.tsbuildinfo
create-figma-plugin:build: 
create-figma-plugin:build: 
create-figma-plugin:build: > create-figma-plugin@2.6.1 build
create-figma-plugin:build: > tsc --build
create-figma-plugin:build: 
@create-figma-plugin/ui:build: cache miss, executing 60fa34a713f67eb7
@create-figma-plugin/build:build: cache miss, executing ab7aadf10cd61afe
create-figma-plugin:build: src/utilities/interpolate-values-into-files-async.ts(4,32): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
create-figma-plugin:build: src/create-figma-plugin-async.ts(3,32): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
create-figma-plugin:build: npm ERR! Lifecycle script `build` failed with error: 
create-figma-plugin:build: npm ERR! Error: command failed
create-figma-plugin:build: npm ERR!   in workspace: create-figma-plugin@2.6.1
create-figma-plugin:build: npm ERR!   at location: C:\source\create-figma-plugin-origin\packages\create-figma-plugin
create-figma-plugin:build: ERROR: command finished with error: command (C:\source\create-figma-plugin-origin\packages\create-figma-plugin) npm run build exited (1)
@create-figma-plugin/ui:build: 
@create-figma-plugin/ui:build: > @create-figma-plugin/ui@2.6.1 prebuild
@create-figma-plugin/ui:build: > npm run clean
@create-figma-plugin/ui:build: 
@create-figma-plugin/build:build: 
@create-figma-plugin/build:build: > @create-figma-plugin/build@2.6.1 prebuild
@create-figma-plugin/build:build: > npm run clean
@create-figma-plugin/build:build: 
@create-figma-plugin/ui:build: 
@create-figma-plugin/ui:build: > @create-figma-plugin/ui@2.6.1 clean
@create-figma-plugin/ui:build: > rimraf --glob '*.log' lib 'src/**/*.css.d.ts' tsconfig.tsbuildinfo
@create-figma-plugin/ui:build: 
@create-figma-plugin/build:build: 
@create-figma-plugin/build:build: > @create-figma-plugin/build@2.6.1 clean
@create-figma-plugin/build:build: > rimraf --glob '*.log' lib tsconfig.tsbuildinfo
@create-figma-plugin/build:build: 
@create-figma-plugin/build:build: 
@create-figma-plugin/ui:build: 
@create-figma-plugin/ui:build: > @create-figma-plugin/ui@2.6.1 build
@create-figma-plugin/ui:build: > concurrently npm:build:generate-colors-types npm:build:generate-icons && npm run build:generate-index && npm run build:js && npm run build:copy-non-ts-files
@create-figma-plugin/ui:build: 
@create-figma-plugin/build:build: > @create-figma-plugin/build@2.6.1 build
@create-figma-plugin/build:build: > tsc --build
@create-figma-plugin/build:build: 
@create-figma-plugin/build:build: src/utilities/build-bundles-async/build-bundles-async.ts(10,8): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
@create-figma-plugin/build:build: src/utilities/build-bundles-async/build-bundles-async.ts(212,9): error TS2345: Argument of type '{ commandId: any; handler: any; src: any; }' is not assignable to parameter of type 'EntryFile'.
@create-figma-plugin/build:build:   Object literal may only specify known properties, and 'handler' does not exist in type 'EntryFile'.
@create-figma-plugin/build:build: src/utilities/build-bundles-async/build-bundles-async.ts(226,56): error TS2339: Property 'src' does not exist on type 'EntryFile'.
@create-figma-plugin/build:build: src/utilities/build-bundles-async/build-bundles-async.ts(226,76): error TS2339: Property 'handler' does not exist on type 'EntryFile'.
@create-figma-plugin/build:build: src/utilities/build-css-modules-typings-async.ts(5,27): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
@create-figma-plugin/build:build: src/utilities/build-manifest-async.ts(20,8): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
@create-figma-plugin/build:build: src/build-async.ts(1,38): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
@create-figma-plugin/build:build: src/utilities/type-check/type-check-watch.ts(1,21): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
@create-figma-plugin/build:build: src/watch-async/watch-ignore-regex.ts(1,27): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
@create-figma-plugin/build:build: src/watch-async/watch-async.ts(1,49): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
@create-figma-plugin/build:build: src/cli.ts(2,21): error TS2306: File 'C:/source/create-figma-plugin-origin/packages/common/lib/index.d.ts' is not a module.
@create-figma-plugin/build:build: npm ERR! Lifecycle script `build` failed with error: 
@create-figma-plugin/build:build: npm ERR! Error: command failed 
@create-figma-plugin/build:build: npm ERR!   in workspace: @create-figma-plugin/build@2.6.1
@create-figma-plugin/build:build: npm ERR!   at location: C:\source\create-figma-plugin-origin\packages\build
@create-figma-plugin/ui:build: [build:generate-icons] 
@create-figma-plugin/ui:build: [build:generate-icons] > @create-figma-plugin/ui@2.6.1 build:generate-icons
@create-figma-plugin/ui:build: [build:generate-icons] > tsx scripts/generate-icons.ts && eslint --fix 'src/icons/**/*.{ts,tsx}'
@create-figma-plugin/ui:build: [build:generate-icons]
@create-figma-plugin/ui:build: [build:generate-colors-types]
@create-figma-plugin/ui:build: [build:generate-colors-types] > @create-figma-plugin/ui@2.6.1 build:generate-colors-types
@create-figma-plugin/ui:build: [build:generate-colors-types] > tsx scripts/generate-colors-types.ts && eslint --fix src/types/colors.ts
@create-figma-plugin/ui:build: [build:generate-colors-types]
@create-figma-plugin/ui:build: [build:generate-colors-types] npm run build:generate-colors-types exited with code 0
@create-figma-plugin/ui:build: [build:generate-icons] 
@create-figma-plugin/ui:build: [build:generate-icons] Oops! Something went wrong! :(
@create-figma-plugin/ui:build: [build:generate-icons]
@create-figma-plugin/ui:build: [build:generate-icons] ESLint: 8.47.0
@create-figma-plugin/ui:build: [build:generate-icons]
@create-figma-plugin/ui:build: [build:generate-icons] No files matching the pattern "'src/icons/**/*.{ts,tsx}'" were found.
@create-figma-plugin/ui:build: [build:generate-icons] Please check for typing mistakes in the pattern.
@create-figma-plugin/ui:build: [build:generate-icons]
@create-figma-plugin/ui:build: [build:generate-icons] npm ERR! Lifecycle script `build:generate-icons` failed with error:
@create-figma-plugin/ui:build: [build:generate-icons] npm ERR! Error: command failed
@create-figma-plugin/ui:build: [build:generate-icons] npm ERR!   in workspace: @create-figma-plugin/ui@2.6.1
@create-figma-plugin/ui:build: npm ERR!   at location: C:\source\create-figma-plugin-origin\packages\ui
@create-figma-plugin/ui:build: [build:generate-icons] npm run build:generate-icons exited with code 1
@create-figma-plugin/ui:build: npm ERR! Lifecycle script `build` failed with error: 
@create-figma-plugin/ui:build: npm ERR! Error: command failed
@create-figma-plugin/ui:build: npm ERR!   in workspace: @create-figma-plugin/ui@2.6.1
@create-figma-plugin/ui:build: npm ERR!   at location: C:\source\create-figma-plugin-origin\packages\ui
create-figma-plugin#build: command (C:\source\create-figma-plugin-origin\packages\create-figma-plugin) npm run build exited (1)

 Tasks:    2 successful, 5 total
Cached:    0 cached, 5 total
  Time:    36.733s
Failed:    create-figma-plugin#build

 ERROR  run failed: command  exited (1)
npm ERR! code 1
npm ERR! path C:\source\create-figma-plugin-origin
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c simple-git-hooks && tsx scripts/patch-figma-plugin-typings.ts && npm run build

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Anton\AppData\Local\npm-cache\_logs\2023-10-06T14_32_52_066Z-debug-0.log
yuanqing commented 4 weeks ago

This should be fixed by https://github.com/yuanqing/create-figma-plugin/pull/211