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

[bug] npm init svelte@next - some files missing #2952

Closed
benmccann opened this issue Dec 1, 2021 · 5 comments · Fixed by #2990
Closed

[bug] npm init svelte@next - some files missing #2952

benmccann opened this issue Dec 1, 2021 · 5 comments · Fixed by #2990
Labels
bug Something isn't working pkg:create-svelte
Milestone

Comments

@benmccann
Copy link
Member

benmccann commented Dec 1, 2021

Describe the bug

I don't get any warning using npm 6 and Node 12 on Ubuntu. If I create an .npmrc with engine-strict=true then it will fail. We try to do that today:

https://github.com/sveltejs/kit/blob/master/packages/create-svelte/templates/skeleton/.npmrc
https://github.com/sveltejs/kit/blob/master/packages/create-svelte/templates/default/.npmrc

But those files don't get created for some reason

Reproduction

If I run npm init svelte@next my-test-app I don't see an .npmrc file being created in the new app

Logs

No response

System Info

System:
    OS: Linux 5.13 Ubuntu 21.10 21.10 (Impish Indri)
  Binaries:
    Node: 16.4.0 - ~/.nvm/versions/node/v16.4.0/bin/node
    npm: 7.18.1 - ~/.nvm/versions/node/v16.4.0/bin/npm

Severity

annoyance

Additional Information

No response

@benmccann benmccann added the bug Something isn't working label Dec 1, 2021
@benmccann benmccann added this to the 1.0 milestone Dec 1, 2021
@Conduitry
Copy link
Member

Conduitry commented Dec 1, 2021

It looks like the files disappeared from the published package in [email protected]. That would point to #2109 as the culprit, but I don't see anything jump out at me in a quick pass through that PR.

@Conduitry
Copy link
Member

My next guess is that this was due to a bump in the version of (p)npm used to publish the packages. When I build everything locally, I do see .npmrc files where I expect to see them in the local file system, but when I run npm pack from packages/create-svelte to produce the tarball that would be sent to the registry, it doesn't contain the .npmrc files.

It could be that we need to store it as npmrc in the package (like we currently do with gitignore) and then rename it with the . afterwards.

@Conduitry
Copy link
Member

Yeah, if I run npm pack with npm 6, I get the .npmrc files in the resulting tarball. I didn't look extremely closely, but I don't see anything in https://github.com/npm/cli/blob/latest/changelogs/CHANGELOG-7.md that sounds like it would have caused this. But in any case, we probably want to rename the file.

@benmccann
Copy link
Member Author

@Conduitry
Copy link
Member

Hmm I don't see any relevant differences in the documentation page they linked to in their own answer between v6 and v7 (.npmrc is listed as automatically ignored in both) so maybe this was considered a bug in v6? In any case, it would be a lot easier to just deal with this than figure out why it changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:create-svelte
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants