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

Publish package-lock.json to npmjs.com #484

Closed
ianhe8x opened this issue Sep 18, 2021 · 2 comments
Closed

Publish package-lock.json to npmjs.com #484

ianhe8x opened this issue Sep 18, 2021 · 2 comments
Assignees

Comments

@ianhe8x
Copy link
Collaborator

ianhe8x commented Sep 18, 2021

Even though the project is organized in mono repo way via yarn workspace, we don't recommend user install the package to their global using yarn global add. It was detailed in #355.

The problem is we only have yarn.lock in the code base without package-lock.json. npm -g install doesn't recognize yarn.lock so when user tries to install our app, there are actually no lockfile used. It caused a lot dependency issues.

I can think of one solution, that we still use yarn and yarn.lock in the code base, but convert yarn.lock to package-lock.json via tools like synp when publishing packages to npmjs.com.

@ianhe8x ianhe8x changed the title publish package-lock.json to npmjs.com Publish package-lock.json to npmjs.com Sep 18, 2021
@jiqiang90 jiqiang90 self-assigned this Sep 18, 2021
@jiqiang90
Copy link
Member

jiqiang90 commented Sep 23, 2021

imsnif/synp#74

Could successful convert yarn.lock v1, but v2:

Jis-MacBook-Pro:subql jiatwork$ synp --source-file yarn.lock --with-workspace
Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in lockfile

@stwiname
Copy link
Collaborator

NPM doesn't allow publishing package-lock.json. We don't have any complaints as this being an issue, im going to close

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

No branches or pull requests

3 participants