Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): building workaround #307

Merged
merged 4 commits into from
May 20, 2024
Merged

fix(deps): building workaround #307

merged 4 commits into from
May 20, 2024

Conversation

TorinAsakura
Copy link
Member

No description provided.

@TorinAsakura TorinAsakura requested a review from Nelfimov April 5, 2024 12:31
@Nelfimov
Copy link
Member

nikoroach@Nikitas-MacBook-Pro tools % yarn
node:internal/modules/esm/get_format:160
  throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath);
        ^

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/nikoroach/Documents/Typescript/atlantis/tools/yarn/cli/src/cli.ts
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
    at defaultLoad (node:internal/modules/esm/load:143:22)
    at async ModuleLoader.load (node:internal/modules/esm/loader:403:7)
    at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:45)
    at async link (node:internal/modules/esm/module_job:78:21) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Node.js v20.12.2
which yarn
/opt/homebrew/opt/node@20/bin/yarn

@Nelfimov
Copy link
Member

Переписал скрипт yarn:download

    "yarn:download": "node -r .pnp.cjs --loader .pnp.loader.mjs --experimental-vm-modules  $(yarn workspace @atls/yarn-plugin-pnp-patch yarn:download && yarn workspace @atls/yarn-test-utils yarn:download)"

Так же перенастроил использование стокового yarn для выполнения скрипта:

yarnrc.yaml

yarnPath: .yarn/releases/yarn-4.1.1.cjs

Ошибка в выполнении скрипта:

/Users/nikoroach/Documents/Typescript/atlantis/tools/.pnp.cjs:24245
    throw firstError;
    ^

Error: Your application tried to access .pnp.cjs, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.

Required package: .pnp.cjs
Required by: /Users/nikoroach/Documents/Typescript/atlantis/tools/

Require stack:
- internal/preload
    at require$$0.Module._resolveFilename (/Users/nikoroach/Documents/Typescript/atlantis/tools/.pnp.cjs:24244:13)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at require$$0.Module._load (/Users/nikoroach/Documents/Typescript/atlantis/tools/.pnp.cjs:24135:31)
    at internalRequire (node:internal/modules/cjs/loader:174:19)
    at Module._preloadModules (node:internal/modules/cjs/loader:1574:5)
    at loadPreloadModules (node:internal/process/pre_execution:723:5)
    at setupUserModules (node:internal/process/pre_execution:203:5)
    at prepareExecution (node:internal/process/pre_execution:159:5)
    at prepareMainThreadExecution (node:internal/process/pre_execution:54:10)
    at node:internal/main/repl:21:1

Node.js v20.12.2

Полный лог:

nikoroach@Nikitas-MacBook-Pro tools % yarn yarn:download
(node:64525) ExperimentalWarning: Use `importAttributes` instead of `importAssertions`
(Use `node --trace-warnings ...` to show where the warning was created)
(node:64525) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Cloning into '/var/folders/jp/l02ssmrj72d9r92lyc5r75cr0000gn/T/yarn-pnp-qwkCMjaTYPDa'...
Note: switching to '52909a5e0d2fe72245957870bcd654218d93ef72'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

(node:64622) ExperimentalWarning: Use `importAttributes` instead of `importAssertions`
(Use `node --trace-warnings ...` to show where the warning was created)
(node:64622) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Cloning into '/var/folders/jp/l02ssmrj72d9r92lyc5r75cr0000gn/T/yarn-wdWSCTeSWZra'...
Note: switching to '52909a5e0d2fe72245957870bcd654218d93ef72'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

/Users/nikoroach/Documents/Typescript/atlantis/tools/.pnp.cjs:24245
    throw firstError;
    ^

Error: Your application tried to access .pnp.cjs, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.

Required package: .pnp.cjs
Required by: /Users/nikoroach/Documents/Typescript/atlantis/tools/

Require stack:
- internal/preload
    at require$$0.Module._resolveFilename (/Users/nikoroach/Documents/Typescript/atlantis/tools/.pnp.cjs:24244:13)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at require$$0.Module._load (/Users/nikoroach/Documents/Typescript/atlantis/tools/.pnp.cjs:24135:31)
    at internalRequire (node:internal/modules/cjs/loader:174:19)
    at Module._preloadModules (node:internal/modules/cjs/loader:1574:5)
    at loadPreloadModules (node:internal/process/pre_execution:723:5)
    at setupUserModules (node:internal/process/pre_execution:203:5)
    at prepareExecution (node:internal/process/pre_execution:159:5)
    at prepareMainThreadExecution (node:internal/process/pre_execution:54:10)
    at node:internal/main/repl:21:1

Node.js v20.12.2

@Nelfimov
Copy link
Member

Nelfimov commented May 6, 2024

#307 (comment)

Скрипт выше работает - ошибку можно игнорировать.


yarnPath: yarn/cli/src/cli.dev.mjs

По прежнему не работает - не читает расширение .ts


yarnPath: .yarn/releases/yarn.cjs

plugins:
  - path: yarn/plugin-pnp-patch/bundles/@yarnpkg/plugin-pnp-patch.cjs

Билдит, однако похоже что в cjs формате.


@TorinAsakura какие дальнейшие шаги?

@TorinAsakura
Copy link
Member Author

#307 (comment)

Скрипт выше работает - ошибку можно игнорировать.

yarnPath: yarn/cli/src/cli.dev.mjs

По прежнему не работает - не читает расширение .ts

yarnPath: .yarn/releases/yarn.cjs

plugins:
  - path: yarn/plugin-pnp-patch/bundles/@yarnpkg/plugin-pnp-patch.cjs

Билдит, однако похоже что в cjs формате.

@TorinAsakura какие дальнейшие шаги?

сборка работает? тулзы пашут? значит надо мержить в рабочую ветку и продолжать грейд, твоя задача нормализовать работу тулзов на данном этапе, остальную работу по фичам Райдзина я продолжу сам

@Nelfimov
Copy link
Member

Nelfimov commented May 6, 2024

yarnPath: yarn/cli/src/cli.dev.mjs

По прежнему не работает - не читает расширение .ts

~/Documents/Typescript/atlantis/tools git:[fix/env-building]
yarn
node:internal/modules/esm/get_format:160
  throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath);
        ^

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/nikoroach/Documents/Typescript/atlantis/tools/yarn/cli/src/cli.ts
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
    at defaultLoad (node:internal/modules/esm/load:143:22)
    at async ModuleLoader.load (node:internal/modules/esm/loader:403:7)
    at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:45)
    at async link (node:internal/modules/esm/module_job:78:21) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Node.js v20.12.2

@TorinAsakura TorinAsakura merged commit 0bd4400 into feat/raijin May 20, 2024
0 of 2 checks passed
@TorinAsakura TorinAsakura deleted the fix/env-building branch May 20, 2024 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants