kurisubrooks / tfnsw-pids

Sydney Trains Passenger Information Display (PIDs)
17 stars 2 forks source link

Node.js: ERR_PACKAGE_PATH_NOT_EXPORTED #2

Closed Anon-4 closed 2 years ago

Anon-4 commented 2 years ago

Hi there,

I'm not too sure if this is related to #1, but when attempting to start the program with yarn start, it would return the error code: ERR_PACKAGE_PATH_NOT_EXPORTED.

yarn run v1.22.18
warning ../package.json: No license field
$ react-scripts start
node:internal/modules/cjs/loader:489
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /Users/JonA/Desktop/Test/tfnsw-pids/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:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:719:3)
    at resolveExports (node:internal/modules/cjs/loader:483:36)
    at Module._findPath (node:internal/modules/cjs/loader:523:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:925:27)
    at Module._load (node:internal/modules/cjs/loader:780:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/JonA/Desktop/Test/tfnsw-pids/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v18.0.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
kurisubrooks commented 2 years ago

This seems to be an issue related to the latest version of Node.js, try using Node.js LTS (v14) and it should work fine.

Anon-4 commented 2 years ago

Yeah just switched to Node.js v14 like you said and it works fine now. Thanks for that. I'll go ahead and close this issue for you.