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

Snowpack can't find node_modules/optimal-select/src/index.js #70

Open
ziodave opened this issue Jun 24, 2021 · 0 comments
Open

Snowpack can't find node_modules/optimal-select/src/index.js #70

ziodave opened this issue Jun 24, 2021 · 0 comments

Comments

@ziodave
Copy link

ziodave commented Jun 24, 2021

Hello,

I am using Snowpack, my package.json looks something like this:

{
  "name": "app",
  "version": "0.0.1",
  "description": "",
  "main": "src/index.js",
  "scripts": {
    "start": "snowpack dev",
    "build": "snowpack build",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "esbuild": "^0.12.5",
    "snowpack": "^3.5.2",
    "tslib": "^2.2.0",
    "typescript": "^4.3.2"
  },
  "dependencies": {
    "optimal-select": "^4.0.1"
  }
}

When I try to npm start I get the following error:

[snowpack] We resolved "optimal-select" to ./node_modules/optimal-select/src/index.js, but the file does not exist on disk.

In node_modules/optimal-select I can't find the src folder:

image

By looking into the package.json file I can see the following declaration:

…
"module": "src/index.js",
…

If I change it to

…
"module": "lib/index.js",
…

it works.

Is it the right thing to do?

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

1 participant