-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[...] /path/to/project/root/package.json
can currently [..] have [...] no other fields
#1921
Comments
I am also having the same issue (I am also in a ts project) I changed my import to point to some JS incase it was that.
|
I was using JS and had the same error. Had to move all the JS code to a separate folder and it worked 😬 |
Interesting il try that. I think the function I wanted to export was in the same folder as some ts sources. This looks like an edge case and some unexpected behaviour, certainly unhelpful error either way. |
Thanks for the report! This was initially done to be as conservative as possible, but I think that this has tripped up enough users that it's fine to ignore all non- |
@alexcrichton its this code at if key != "dependencies" || iter.next().is_some() {
bail!(
"NPM manifest found at `{}` can currently only have one key, \
`dependencies`, and no other fields",
path.display()
);
} My Wasm module is cohabiting with a Typescript package, so I did what most would do, Happy to PR this, just not contributed to anything before. |
@adam-cyclones yep that sounds like the right spot, and it should likely be pretty safe to just delete. |
Sorry I started a new job, have been preoccupied. Glad it's closed 😁
…On Tue, 21 Jan 2020, 7:04 pm Alex Crichton, ***@***.***> wrote:
Closed #1921 <#1921> via
#1969 <#1969>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1921?email_source=notifications&email_token=AB7XUGJCRSV7V3WQ6ZMT6LDQ65BMVA5CNFSM4J5QLLS2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWDPQOJY#event-2967406375>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7XUGLEYCIX3NTH6IWNCNDQ65BMVANCNFSM4J5QLLSQ>
.
|
Hey there!
I have a project directory, where both
cargo
andnpm
reside. Thepackage.json
has, among others, ascripts
section to centralize custom commands related to the project.When I add
to a Rust file, I get the following error when compiling (in this case by invoking
wasm-pack
, but it should be unrelated):Can you help me understand why this limitation exists? Why is e.g. ignoring the other keys not an option?
The text was updated successfully, but these errors were encountered: