frctl/fractalite

Error: Cannot find module '@frctl/fractalite-support'

sturobson opened this issue · 8 comments

Hi,

I followed the instructions from the README.md file but got this error when running npm run demo.

Node version: v10.15.2
NPM version: v6.4.1

Steps to reproduce:

npm install
npm run bootstrap
npm run demo

I tried to install: npm install -g @frctl/fractalite-support but it does not exist.

Hi @sturobson! Great to see you kicking the tyres on this, will be very interested in your feedback once you get it up and running :-)

Unfortunately I can't seem to replicate the issue and the test run by travis (the few that there are!) seem to be still passing which makes this tricky to debug. A few questions:

  • Are you using the master branch of the repo?
  • Are you on Windows or MacOS?
  • When you run the npm run bootstrap command what happens? You should get some output that ends with lerna success Bootstrapped 10 packages. Is that what you see?

Installing @frctl/fractalite-support directly will indeed fail as none of the packages have actually been published yet - the npm run bootstrap command should resolve all of those packages locally to make the whole monorepo structure work.

Sorry you are running into problems but hopefully we can resolve them!

Hi Mark

I'm on the master branch, on MacOS, npm run bootstrap gives me the output you mentioned.

Error: Cannot find module '@frctl/fractalite-support'
    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:22:18)
    at Object.<anonymous> (/Users/admin/Sites/fractalite/packages/fractalite/bin/fractalite:8:24)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @frctl/fractalite-demo-nunjucks@ start: `fractalite start --port 3030`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @frctl/fractalite-demo-nunjucks@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/admin/.npm/_logs/2019-03-12T07_51_54_187Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fractalite@ demo:nunjucks: `npm run bootstrap && cd demos/nunjucks && npm run start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fractalite@ demo:nunjucks script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/admin/.npm/_logs/2019-03-12T07_51_54_216Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fractalite@ demo: `npm run demo:nunjucks`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fractalite@ demo script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/admin/.npm/_logs/2019-03-12T07_51_54_242Z-debug.log

that's the error in the terminal.

I can upload the .log to some gists if that will help.

I've also tried sudo 😄

Hmm this is an odd one, I've got to say I'm a bit stumped by this.. :-(

It looks like Lerna is somehow failing to bootstrap the packages together correctly... otherwise the @frctl/fractalite-support require would be getting resolved by a symlink as it should do.

Do you think you could run the command ls -l packages/fractalite/node_modules/@frctl from within the root of the repository directory and paste the result in here? Then I can see if the symlimks are being created properly.

Thanks Stu!

Screenshot 2019-03-12 at 14 29 06

ls: packages/fractalite/node_modules/@frctl: No such file or directory

npm run bootstrap ran pretty quick. I'd also tried the above with all the sudo and get the same result.

ok, I cloned again into a fresh local directory, ran the instructions and it worked fine. I'll put this down the the original git clone silently failing somewhere.

So, it works - I think there was a hiccup in the git clone - we can close this.

Thanks for your help in trying to find this issue.

Now, time to play.

Ok great, glad you got it sorted. Let me know what you think about it once you've had a chance to play around :-)