admin管理员组文章数量:1405559
I am a newbie to react and lot of struggle getting started, this may be a simple problem but I couldnt find an answer in google or whatever. I was trying to run a git code from a youtube channel - lama dev from sep - 2021. Is that an issue due to the changes in node since that period? My react app in not getting started due to this
node:internal/modules/cjs/loader:488
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in E:\E- Project\ver-one-zero-one\node_modules\postcss-safe-parser\node_modules\postcss\package.json
at new NodeError (node:internal/errors:372:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:439:9)
at packageExportsResolve (node:internal/modules/esm/resolve:718:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (E:\E- Project\ver-one-zero-one\node_modules\postcss-safe-parser\lib\safe-parser.js:1:17) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v17.7.2
I am a newbie to react and lot of struggle getting started, this may be a simple problem but I couldnt find an answer in google or whatever. I was trying to run a git code from a youtube channel - lama dev from sep - 2021. Is that an issue due to the changes in node since that period? My react app in not getting started due to this
node:internal/modules/cjs/loader:488
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in E:\E- Project\ver-one-zero-one\node_modules\postcss-safe-parser\node_modules\postcss\package.json
at new NodeError (node:internal/errors:372:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:439:9)
at packageExportsResolve (node:internal/modules/esm/resolve:718:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (E:\E- Project\ver-one-zero-one\node_modules\postcss-safe-parser\lib\safe-parser.js:1:17) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v17.7.2
Share
Improve this question
asked Jun 6, 2022 at 7:14
Ajmal RahmanAjmal Rahman
1592 silver badges16 bronze badges
1
- on searching at the left end (explorer of vs code) I couldn't find any result for ./lib or lib or .lib etc? what would that be? @DeanJames – Ajmal Rahman Commented Jun 6, 2022 at 7:24
2 Answers
Reset to default 6I tried updating the node modules with
npm update
and the issue was solved. I am keeping it here so that someone else can find the answer if they are looking for
You should add "./lib/tokenize.js" to the exports entry of package.json so you can import it.
本文标签: javascriptPackage subpath 39libtokenize39 is not defined by quotexportsquotStack Overflow
版权声明:本文标题:javascript - Package subpath '.libtokenize' is not defined by "exports" - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744275404a2598386.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论