Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'svelte/store.mjs' #5

Open
rob-balfre opened this issue Jun 23, 2019 · 10 comments
Open

Error: Cannot find module 'svelte/store.mjs' #5

rob-balfre opened this issue Jun 23, 2019 · 10 comments

Comments

@rob-balfre
Copy link

After following the setup guide I get the error Error: Cannot find module 'svelte/store.mjs' when trying to run yarn dev

@mortscode
Copy link

Same issue

@rob-balfre
Copy link
Author

Respecting the yarn.lock file is the solution. Svelte and Sapper are out of sync otherwise.

@mortscode
Copy link

@rob-balfre what do you mean by "respecting"? Can I just delete it and re-install the dependencies?

@rob-balfre
Copy link
Author

@mortscode I had to use the lock file that is currently in this repo (don't delete or manually upgrade anything) and use yarn and not npm. The problem arose out of my Svelte and Sapper version being incompatible. From discord chat yesterday...

I'm guessing it's because you're getting Svelte >= 3.5.0 but aren't getting Sapper >= 0.27.3
https://github.com/sveltejs/sapper/blob/master/CHANGELOG.md#0273
There were internal changes in Svelte 3.5.0 that were supposed to not be very breaking, but they did require changes in Sapper
If you're installing with something other than Yarn, you won't be respecting their lock file, and the Svelte ^3.0.0 range would end up giving you too new of a version for the Sapper ^0.26 range

@rob-balfre
Copy link
Author

Also worth noting (not tried this yet)...

@rob_b I started with this firebase template as well, upgraded svelte to 361 and sapper to 0274 today and it works fine
fb version is 623
fb admin 820

@mortscode
Copy link

Yeah, I saw those version updates and still struggling. I've been trying to make it work with NPM. I'll give yarn a go.

@rob-balfre
Copy link
Author

@mortscode good luck

@mortscode
Copy link

Ok. I think I'm almost there. Strange issue where my assets aren't making their way down from firebase to my local. So I'm just getting the html with no assets or styles. Borat's jpg and global.css aren't in my static folder so I'm assuming it's not making its way down from the hosting server on firebase.

Any thoughts?

Screen Shot 2019-06-26 at 3 13 36 PM

@mortscode
Copy link

mortscode commented Jun 26, 2019

I'm getting this when I run firebase serve:

[warn] ⚠  Error: Cannot find module './__sapper__/build/server/server'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/scotmortimer/Development/Instrument/Burgerweek/sapper-firebase-template/functions/index.js:5:20)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
[warn] ⚠  We were unable to load your functions code. (see above)

@mortscode
Copy link

ok. up and running. it was lots of things, but got it all sorted out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants