-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cannot find module in core-js when running from NPX #551
Comments
As you can see, this module exists on NPM. That looks like a bug with cache. |
Same here, not aware of that we have configured any caching here, probably CircleCI does internally ... `internal/modules/cjs/loader.js:583 Error: Cannot find module '/root/.npm/_npx/75/lib/node_modules/swagger-cli/node_modules/core-js/scripts/postinstall' npm ERR! A complete log of this run can be found in: |
Yes @jakobdoc, I have a very simple build config with no explicit caching. It's obviously an error between npx, core-js and cirlce ci, but I can't figure out exactly what's causing it. |
I can confirm it only occurs using npx on the CircleCI machine. Using |
We are using Gitlab-CI and we do not have any cache configured for our I have this error in multiple place, where we use Error: Cannot find module '/root/.npm/_npx/1355/lib/node_modules/@yeutech/gitlab-to-github/node_modules/core-js/scripts/postinstall'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! core-js@2.6.6 postinstall: `node scripts/postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the core-js@2.6.6 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
and internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '/root/.npm/_npx/457/lib/node_modules/@yeutech-lab/rollup-umd-documentation-cli/node_modules/core-js/scripts/postinstall'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3) I am now testing a fix to save the presentation I have on thursday for the 1st error using @jakobdoc solution to use if [[ ${NO_NPX_TRANSITIVE} = true ]]; then
npm install -g @yeutech/gitlab-to-github
npx @yeutech/gitlab-to-github github repository gitlab-to-github \
"${name}" "${GH_TOKEN:-$GITHUB_TOKEN}" "${TRAVIS_CI_TOKEN}" \
--organization="${org}" \
--exclude="${SNAPSHOT_BRANCH}" \
--dev-source="${DEV_SOURCE}" \
--dev-target="${DEV_TARGET}" \
--desc="${description}" \
--homepage="${homepage}"
npm uninstall -g @yeutech/gitlab-to-github
else
npx @yeutech/gitlab-to-github github repository gitlab-to-github \
"${name}" "${GH_TOKEN:-$GITHUB_TOKEN}" "${TRAVIS_CI_TOKEN}" \
--organization="${org}" \
--exclude="${SNAPSHOT_BRANCH}" \
--dev-source="${DEV_SOURCE}" \
--dev-target="${DEV_TARGET}" \
--desc="${description}" \
--homepage="${homepage}"
fi Looking forward for a reason and a workaround/fix that does not imply to update our script. |
I have opened a ticket with circleci and I suggest others do the same. In the meantime it would help if this call to post install were removed otherwise many people need to refactor out their use of npx in many different places @zloirock ? Whaddayasay, can ya help us out?! |
I dont believe circleci would help, considering i am using travis and gitlabci and have the same issue.. |
Ah thanks for letting me know, I had only heard of CircleCI having the
issue up until now. So it is somehow between npx and libs that depend on
core-js.
…On Tue, 21 May 2019 at 12:03, Dimitri KOPRIWA ***@***.***> wrote:
I dont believe circleci would help, considering i am using travis and
gitlabci and have the same issue..
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#551?email_source=notifications&email_token=AA2R6F3FPF5OSXGOMFUFGXDPWPJGTA5CNFSM4HOAOX22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV3RS6Y#issuecomment-494344571>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA2R6F2H3FV42DUWZXVVYD3PWPJGTANCNFSM4HOAOX2Q>
.
--
*Jason Green*
*Principal Developer Email: jason.green@threadsstyling.com
<christina.s@threadsstyling.com> Mobile: +44 7462 752 694
<++44+7462+752+694>*
[image: Snapchat] <https://www.snapchat.com/add/threads_styling> [image:
Instagram] <https://www.instagram.com/threadsstyling> [image: LinkedIn]
<https://api.whatsapp.com/send?phone=447881362517>
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. If you are not the intended recipient
you are notified that disclosing, copying, distributing or taking any
action in reliance on the contents of this information is strictly
prohibited.
|
getting this too now on shippable, highly doubt it's both shippable and circleci, prob something wrong with recent release?
|
@lukehutton I have checked and nothing to blame here. Perhaps we should blame Sorry to ask @zloirock, but because this module is in a middle of many chains of modules, maybe we could release a new version with a quick and ugly fix. By making the Looking at /* eslint-disable no-console,max-len */
var env = process.env;
var CI = !!env.CI && env.CI !== '0' && env.CI !== 'false';
var SILENT = !!~['silent', 'error', 'warn'].indexOf(env.npm_config_loglevel);
if (!CI && !SILENT) {
console.log('\u001B[96mThank you for using core-js (\u001B[94m https://github.com/zloirock/core-js \u001B[96m)!\u001B[0m\n');
console.log('\u001B[96mPlease consider supporting of core-js on Open Collective or Patreon: \u001B[0m');
console.log('\u001B[96m>\u001B[94m https://opencollective.com/core-js \u001B[0m');
console.log('\u001B[96m>\u001B[94m https://www.patreon.com/zloirock \u001B[0m\n');
console.log('\u001B[96mAlso, the author of core-js (\u001B[94m https://github.com/zloirock \u001B[96m) is looking for a good job -)\u001B[0m\n');
} Nothing is required for the good sack of the software, perhaps someone can give a job to @zloirock :)? This is a fix that would work, by editing "scripts": {
- "postinstall": "node scripts/postinstall"
+ "postinstall": "node scripts/postinstall || true"
} Looking at usage here, we would all want a Also, could we please edit the title and remove the |
Ok I see thanks, just thought perhaps errors were happening coinciding with a release |
I thought about it but after some comments from #548 existence of
I'm not sure that it will work. |
I still can't reproduce it with NPX and on my CI servers... |
Maybe this would work?
|
@nicolo-ribaudo something like that makes sense 👍 |
Thanks for the fix, is it released yet? Will you release a |
It's already released in |
I am still seeing errors (happened since v2.6.6):
|
Before the latest change, all was fine, but now if I try to run
npx bolt --version
on CircleCI I get this error pointing at your package.I know you had a recent change around postinstall and I know this isn't a bolt issue because it happens with other packages that have core-js as a dependency too.
The text was updated successfully, but these errors were encountered: