rrdelaney / reason-scripts

:beginner: Create a ReasonML and React development environment
MIT License
628 stars 58 forks source link

Unexpected error. Please report it as a bug: ~ Creating in a mono Repo #70

Closed rayk closed 5 years ago

rayk commented 6 years ago
Aborting installation.
Unexpected error. Please report it as a bug:
{ Error: Cannot find module '/Users/rayk/Projects/criticide/packages/app/node_modules/reason-scripts/package.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at checkNodeVersion (/Users/rayk/.config/yarn/global/node_modules/create-react-app/createReactApp.js:514:23)
    at getPackageName.then.then.then.packageName (/Users/rayk/.config/yarn/global/node_modules/create-react-app/createReactApp.js:312:7)
    at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }

Deleting generated file... node_modules
Deleting generated file... package.json
Deleting app / from /Users/rayk/Projects/criticide/packages
Done.
error Command failed.
Exit code: 1

I run the following in the packages directory of the mono-repo

yarn create react-app app --scripts-version reason-scripts@cra-next

the same problem occurs when using the current version, that is:

yarn create react-app app --scripts-version reason-scripts

current and cra-next works fine anywhere else.

rrdelaney commented 6 years ago

This is probably a problem from upstream 😕 we don’t differ that much from CRA mainstream, mostly just add a loader for Reason. Sorry about that 😔 I don’t really know where to start on this one

rrdelaney commented 5 years ago

reason-scripts might support monorepo's now that it uses CRA v2.