You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Package breaks when depending on @babel/core 7.12.10 #2620
Locally in this repository, run npm install @babel/core@latest
Try to run the tests
OR
Install github via a git URL or tarball URL to the Atom repo or to one's .atom/packages folder
i. Example workflows: apm install atom/github OR npm install atom/github OR npm install https://github.com/atom/github/tarball/v0.36.7
Error: Cannot find module './assert-messages-plugin.js'
Require stack:
- /home/runner/work/github/github/node_modules/@babel/core/lib/config/files/plugins.js
- /home/runner/work/github/github/node_modules/@babel/core/lib/config/files/index.js
- /home/runner/work/github/github/node_modules/@babel/core/lib/index.js
- /home/runner/work/github/github/node_modules/@atom/babel7-transpiler/lib/index.js
- /home/runner/work/_temp/atom/usr/share/atom-nightly/resources/app.asar/src/package-transpilation-registry.js
- /home/runner/work/_temp/atom/usr/share/atom-nightly/resources/app.asar/src/compile-cache.js
- /home/runner/work/_temp/atom/usr/share/atom-nightly/resources/app.asar/static/index.html
at Module._resolveFilename (internal/modules/cjs/loader.js:627:15)
at Module._resolveFilename (/home/runner/work/_temp/atom/usr/share/atom-nightly/resources/electron.asar/common/reset-search-paths.js:41:16)
at Function.Module._resolveFilename (/home/runner/work/_temp/atom/usr/share/atom-nightly/resources/app.asar/src/module-cache.js:336:28)
at require.resolve (/home/runner/work/_temp/atom/usr/share/atom-nightly/resources/app.asar/src/native-compile-cache.js:70:23)
at resolveStandardizedName (/home/runner/work/github/github/node_modules/@babel/core/lib/config/files/plugins.js:100:7)
at resolvePlugin (/home/runner/work/github/github/node_modules/@babel/core/lib/config/files/plugins.js:44:10)
at loadPlugin (/home/runner/work/github/github/node_modules/@babel/core/lib/config/files/plugins.js:52:20)
at createDescriptor (/home/runner/work/github/github/node_modules/@babel/core/lib/config/config-descriptors.js:154:9)
at /home/runner/work/github/github/node_modules/@babel/core/lib/config/config-descriptors.js:109:50
at Array.map (<anonymous>)
at createDescriptors (/home/runner/work/github/github/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
at createPluginDescriptors (/home/runner/work/github/github/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)
at plugins (/home/runner/work/github/github/node_modules/@babel/core/lib/config/config-descriptors.js:40:19)
at mergeChainOpts (/home/runner/work/github/github/node_modules/@babel/core/lib/config/config-chain.js:415:26)
at /home/runner/work/github/github/node_modules/@babel/core/lib/config/config-chain.js:374:7
at Generator.next (<anonymous>)
at loadFileChain (/home/runner/work/github/github/node_modules/@babel/core/lib/config/config-chain.js:228:24)
at loadFileChain.next (<anonymous>)
at buildRootChain (/home/runner/work/github/github/node_modules/@babel/core/lib/config/config-chain.js:135:29)
at buildRootChain.next (<anonymous>)
at loadPrivatePartialConfig (/home/runner/work/github/github/node_modules/@babel/core/lib/config/partial.js:101:62)
at loadPrivatePartialConfig.next (<anonymous>)
at loadFullConfig (/home/runner/work/github/github/node_modules/@babel/core/lib/config/full.js:57:46)
at loadFullConfig.next (<anonymous>)
at Object.transform (/home/runner/work/github/github/node_modules/@babel/core/lib/transform.js:25:45)
at transform.next (<anonymous>)
at evaluateSync (/home/runner/work/github/github/node_modules/gensync/index.js:251:28)
at Object.sync (/home/runner/work/github/github/node_modules/gensync/index.js:89:14)
at /home/runner/work/github/github/node_modules/@atom/babel7-transpiler/lib/index.js:54:28
at withBabelEnv (/home/runner/work/github/github/node_modules/@atom/babel7-transpiler/lib/index.js:18:15)
Another take on the title for this PR could be:
"Installing the latest github package from master branch (apm install atom/github) is broken"
The cause:
This package's package-lock.json isn't sent (or is ignored) when grabbing this package as a git remote URL or a tarball URL. So the latest @babel/core 7.x is resolved, which happens to be this one 7.12.10 that breaks the package.
I have tested this and it works all the way through @babel/core 7.12.9.
Actually I might have remembered this wrong and only the tarball URL thing is broken: npm install https://github.com/atom/github/tarball/v0.36.7
I think apm install atom/github still works. Running it to confirm. Edit: apm install atom/github is either inconsistent or always broken. I just tried it again and it gave me this error.
I also had some issues upgrading github at the Atom repo, but I see the recent PR used @babel/core 7.12.10 and passed tests... maybe this is because of cding into the package and installing all exact dependencies from package-lock.json.
I know there are some scenarios that are broken with latest @babel/core. Like locally installing and running tests in this repo.
Reposting from the issue in the babel/babel repository:
This is an Atom bug. Starting from Babel 7.10.0 we started using the require.resolve function in Node.js >= 8.9, because it supports the paths option (Node.js docs)
However, Atom completely overrides the require.resolve function with a custom one, removing support for the paths option.
Babel (as well as most of the packages on npm) assumes that the Node.js API hasn't been modified in ways incompatible with the built-in Node.js functions, so there isn't much that we can do to fix this.
Activity
DeeDeeG commentedon Jan 29, 2021
Another take on the title for this PR could be:
"Installing the latest
githubpackage frommasterbranch (apm install atom/github) is broken"The cause:
This package's
package-lock.jsonisn't sent (or is ignored) when grabbing this package as a git remote URL or a tarball URL. So the latest@babel/core7.x is resolved, which happens to be this one7.12.10that breaks the package.I have tested this and it works all the way through
@babel/core7.12.9.CI runs: https://github.com/DeeDeeG/github/actions?query=branch%3Apin-babel
DeeDeeG commentedon Jan 29, 2021
Actually I might have remembered this wrong and only the tarball URL thing is broken:
npm install https://github.com/atom/github/tarball/v0.36.7I think
apm install atom/githubstill works. Running it to confirm. Edit:apm install atom/githubis either inconsistent or always broken. I just tried it again and it gave me this error.I also had some issues upgrading
githubat the Atom repo, but I see the recent PR used@babel/core7.12.10 and passed tests... maybe this is because ofcding into the package and installing all exact dependencies frompackage-lock.json.I know there are some scenarios that are broken with latest
@babel/core. Like locally installing and running tests in this repo.[-]Package breaks when used with @babel/core 7.12.0[/-][+]Package breaks when used with @babel/core 7.12.10[/+][-]Package breaks when used with @babel/core 7.12.10[/-][+]Package breaks when depending on @babel/core 7.12.10[/+]DeeDeeG commentedon Jan 29, 2021
A quick and dirty solution to this would be to pin
@babel/coreto less than 7.12.10 inpackage.json.Example:
npm install --package-lock-only --save-exact @babel/core@'7.0.0 - 7.12.9'Some semver options:
7.0.0 - 7.12.9or7.x < 7.12.10or7.12.9nicolo-ribaudo commentedon Jan 29, 2021
I'm looking into this Babel bug.
DeeDeeG commentedon Jan 29, 2021
@nicolo-ribaudo thank you!
nicolo-ribaudo commentedon Jan 29, 2021
Reposting from the issue in the
babel/babelrepository:package.json: pin @babel/core to less than 7.12.10
package.json: pin @babel/core to less than 7.12.10
package-lock.json: ⬇️ @babel/core 7.12.9
package-lock.json: ⬇️ @babel/core 7.12.9
package-lock.json: ⬇️ @babel/core 7.12.9
package-lock.json: ⬇️ @babel/core 7.12.9 (#21923)