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

import path with slight typo; seen on other Stack Overflow solutions, "../lib/.." is an import error/the culprit #3984

Open
wants to merge 2 commits into
base: source
Choose a base branch
from

Conversation

jayhcrawford
Copy link
Contributor

@jayhcrawford jayhcrawford commented Feb 6, 2025

When I follow the course instructions, I get this path export error:

`npm run graph
//equivalent to npm run node library-backend.js (being the index.js for this file)

[email protected] graph
node library-backend.js

node:internal/modules/cjs/loader:661
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/use/ws' is not defined by "exports" in >/Users/jaycrawford/Documents/GitHub/FullStackOpenSubmissions/part8/library/node_modules/graphql-ws/package.json
at exportsNotFound (node:internal/modules/esm/resolve:314:10)
at packageExportsResolve (node:internal/modules/esm/resolve:661:9)
at resolveExports (node:internal/modules/cjs/loader:654:36)
at Function._findPath (node:internal/modules/cjs/loader:753:31)
at Function._resolveFilename (node:internal/modules/cjs/loader:1396:27)
at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
at Function._load (node:internal/modules/cjs/loader:1215:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:234:24) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
`

by making the changes in the pull request, the server runs successfully

@vejol vejol added the part 8 label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants