nft-minter-tutorial icon indicating copy to clipboard operation
nft-minter-tutorial copied to clipboard

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]

Open razsa opened this issue 3 years ago • 3 comments

[email protected] start react-scripts start

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

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /home//nft-minter-tutorial/minter-starter-files/node_modules/postcss-safe-parser/node_modules/postcss/package.json at new NodeError (node:internal/errors:371:5) at throwExportsNotFound (node:internal/modules/esm/resolve:429:9) at packageExportsResolve (node:internal/modules/esm/resolve:703: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. (/home/neo/nft-minter/nft-minter-tutorial/minter-starter-files/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' }

Node.js v17.4.0

razsa avatar Jan 28 '22 19:01 razsa

You can try to delete node_modules folder and yarn.lock file on the minter-starter-files/ directory.

Run npm install, and npm update after that.

Then you will probably face a new error, where you need to use this command on macOs/linux: export NODE_OPTIONS=--openssl-legacy-provider

Had the same issue, but solved it via those instructions: https://stackoverflow.com/questions/69693907/error-err-package-path-not-exported-package-subpath-lib-tokenize-is-not-d

https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

E: I am also using Node.js v17.4.0.

uleeeeee avatar Feb 11 '22 09:02 uleeeeee

npm update worked for me.

Kevin-Mok avatar Feb 21 '22 12:02 Kevin-Mok

Delete node_modules & yarn.lock, run 'npm install' ...

In your package.json change:

"start": "react-scripts start" with,

"start": "react-scripts --openssl-legacy-provider start",

kmcodesdev avatar Jun 09 '22 22:06 kmcodesdev

this worked for me, thank you!

canberksahin avatar Jan 24 '23 13:01 canberksahin