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

failure resolving implicit package name #23

Closed
FND opened this issue Feb 19, 2019 · 3 comments
Closed

failure resolving implicit package name #23

FND opened this issue Feb 19, 2019 · 3 comments

Comments

@FND
Copy link
Contributor

FND commented Feb 19, 2019

reduced test case:

// faucet.config.js
module.exports = {
    static: [{
        source: "material-design-icons/iconfont",
        target: "./dist/fonts"
    }]
};
$ npm install -D faucet-pipeline-static
$ npm install material-design-icons
$ ./node_modules/.bin/faucet
ERROR: could not resolve `"material-design-icons/iconfont"`

yet source: "./node_modules/material-design-icons/iconfont" works as expected

it appears the error occurs in require.resolve: faucet-core:resolve.js:38 (via l. 23)

require.resolve("material-design-icons", { paths: ["/path/to/root"] })

this is because the iconfont sub-directory does not contain an index.js file - meaning faucet-core's resolvePath is insufficiently generic

tested with Node v11.9.0

@moonglum
Copy link
Member

Does this still apply now that we use the real resolve due to dropping older Node versions? 🤔

@FND
Copy link
Contributor Author

FND commented Jan 15, 2020

Well, given that the issue occurs with Node's own require.resolve (which expects an index.js, apparently) and was confirmed with v11, I would think it's still relevant.

I was uncertain, so have set up a minimal test case that confirms this:
https://github.com/faucet-pipeline/faucet-pipeline-core/commits/testcase-resolve
(note the commit messages and two different CI results)

Thus it seems faucet-pipeline/faucet-pipeline-core@90a022c is not relevant.

@FND
Copy link
Contributor Author

FND commented Mar 19, 2021

fixed in faucet-core v1.5.1 (faucet-pipeline/faucet-pipeline-core@685eefa)

@FND FND closed this as completed Mar 19, 2021
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

2 participants