-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
3.11.0 Cannot find module 'tslib' #3469
Comments
I can acknowledge the problem. It came up with the newest version, 3.10.3 worked fine. Maybe @matthew-dean could check the last merge? Steps to reproduce with docker
FROM buildpack-deps:buster
COPY test.less /
# install npm
ENV HOME /root
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
# install less and compile something
RUN npm install -g less
WORKDIR /
RUN lessc test.less test.css
This will cause the following error:
|
Also reproducible with grunt-contrib-less ("grunt-contrib-less": "2.0.0") which uses "less": "^3.0.4". |
3.11.0 was such a big update. |
Also triggered errors on the Yarn E2E testsuite (we use that to monitor various projects): I suspect the project just needs to add a dependency to |
Well shoot, sorry all. The build was passing unit tests, so I guess there was a missing test here.
Not really, in terms of semver. There should be no backwards-incompatible changes, just changes to some build settings. I'll check it out shortly. |
Probably the reason this happened is because tslib might be an implicit dependency (dependency of a dependency) in the devDependencies. So tests would pass but a normal |
+1, also seeing this with apostrophecms. Looks like this will be getting fixed quickly, thank you. |
As an aside, if anyone knows of a reliable method to simulate / test a library install as a dependency and run tests without the need to wipe / reinstall node modules, I'd love to hear it. |
@matthew-dean Fwiw this kind of issue is one of the reasons we introduced Plug'n'Play in Yarn. It throws exceptions when packages make unsafe accesses (such as To give you an example, this is what the test I linked reported: |
Can someone verify that this build is fixing things? https://github.com/less/less.js/tree/release-3.11.1 |
You can have node_modules folders nested anywhere. So you can put one in
your test/ folder that is only used for this purpose and is more convenient
to blow up. We do this with apostrophe.
…On Mon, Feb 10, 2020 at 4:37 PM Matthew Dean ***@***.***> wrote:
Can someone verify that this build is fixing things?
https://github.com/less/less.js/tree/release-3.11.1
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3469?email_source=notifications&email_token=AAAH27IM5UVBLOEMPE5BJR3RCHCJBA5CNFSM4KSHHJ62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKMI5A#issuecomment-584369268>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27OZWO622K5JYHEYNCLRCHCJBANCNFSM4KSHHJ6Q>
.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
Inside that you can have a symlink to find the main folder of the module by
the right name.
…On Mon, Feb 10, 2020 at 5:02 PM Tom Boutell ***@***.***> wrote:
You can have node_modules folders nested anywhere. So you can put one in
your test/ folder that is only used for this purpose and is more convenient
to blow up. We do this with apostrophe.
On Mon, Feb 10, 2020 at 4:37 PM Matthew Dean ***@***.***>
wrote:
> Can someone verify that this build is fixing things?
> https://github.com/less/less.js/tree/release-3.11.1
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#3469?email_source=notifications&email_token=AAAH27IM5UVBLOEMPE5BJR3RCHCJBA5CNFSM4KSHHJ62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKMI5A#issuecomment-584369268>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAH27OZWO622K5JYHEYNCLRCHCJBANCNFSM4KSHHJ6Q>
> .
>
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
@matthew-dean ... how can i change my package.json file to try out your new release? I still am only able to pull down 3.11.0 if I don't specify a version. |
@boutell That's not the most clear description. Do you mean setting up some sort of sub-package in the repo? I'm wondering how you do this in a way that won't encounter Node's parent https://docs.npmjs.com/files/package.json#git-urls-as-dependencies |
Hmm. No, you're right, that doesn't quite suit your situation. The only
sure thing I can think of would be setting up a local npm proxy in which
that particular module is satisfied from your own location, and testing npm
install against that. Local npm proxies like this are actually not hard to
come by but it is kind of a lot.
…On Mon, Feb 10, 2020 at 5:10 PM Matthew Dean ***@***.***> wrote:
@boutell <https://github.com/boutell> That's not the most clear
description. Do you mean setting up some sort of sub-package in the repo?
I'm wondering how you do this in a way that won't encounter Node's parent
node_modules resolution algorithm.
@jmwolfe <https://github.com/jmwolfe>
https://docs.npmjs.com/files/package.json#git-urls-as-dependencies
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3469?email_source=notifications&email_token=AAAH27O3T4O2Z7VPTBA6HYLRCHGEPA5CNFSM4KSHHJ62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKPPYQ#issuecomment-584382434>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27JP6LEUZIENWBEWERLRCHGEPANCNFSM4KSHHJ6Q>
.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
@matthew-dean - using this in my package.json works to fix gulp-less which depends on less:
my resulting gulpfile.js loads perfectly. ps. gulp-less and a few other packages are in devDependencies. |
Great, thank you! Is this published to npm?
…On Tue, Feb 11, 2020 at 12:53 AM Matthew Dean ***@***.***> wrote:
Closed #3469 <#3469> via 842386b
<842386b>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3469?email_source=notifications&email_token=AAAH27NPPJXO4IOUM2I2J3LRCI4NLA5CNFSM4KSHHJ62YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWRJHA5I#event-3025301621>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27I5LOTWY22VMC57QFLRCI4NLANCNFSM4KSHHJ6Q>
.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
@boutell yes it is. I just verified. |
👍 thanks for all you do!
…On Tue, Feb 11, 2020 at 12:18 PM Jesse Wolfe ***@***.***> wrote:
@boutell <https://github.com/boutell> yes it is. I just verified.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3469?email_source=notifications&email_token=AAAH27P3RR4ZWL6PXZHC7N3RCLMXRA5CNFSM4KSHHJ62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELNIUHY#issuecomment-584747551>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27MKPLJTLBZ5NLHZWALRCLMXRANCNFSM4KSHHJ6Q>
.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
For those who were still facing the issueI was using Ubuntu 22.04 when I faced this issue. Node, npm are installed in Ubuntu in several ways. 1st way: Ubuntu package manager
|
Cannot find module 'tslib' 3.11.0
The text was updated successfully, but these errors were encountered: