Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Service worker warns: No directory provided. Skipping CSS generation #298

Closed
mattpilott opened this issue Jan 23, 2021 · 11 comments · Fixed by sveltejs/sapper#1723
Closed

Comments

@mattpilott
Copy link
Contributor

Been seeing this warning lately, not sure what has led to it

Screenshot 2021-01-23 at 2 06 58 pm

Presumably it's something that can be resolved in the rollup config

@gustavopch
Copy link

gustavopch commented Jan 28, 2021

@yashsamit
Copy link

Any idea how to fix it?

@jessaleks
Copy link

Been seeing this warning lately, not sure what has led to it

Screenshot 2021-01-23 at 2 06 58 pm

Presumably it's something that can be resolved in the rollup config

but where 🤔

@Pytal
Copy link

Pytal commented Feb 21, 2021

I hid the warning message by adding this line into the onwarn function of rollup.config.js

  (warning.plugin === 'css' && warning.message === 'No directory provided. Skipping CSS generation') ||

Full onwarn function:

const onwarn = (warning, onwarn) =>
  (warning.code === 'MISSING_EXPORT' && /'preload'/.test(warning.message)) ||
  (warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) ||
  (warning.code === 'THIS_IS_UNDEFINED') ||
  (warning.plugin === 'css' && warning.message === 'No directory provided. Skipping CSS generation') ||
  onwarn(warning)

@yashsamit
Copy link

We should identify and remove the problem. This is not a good idea. I think :)

@didiermun
Copy link

We should identify and remove the problem. This is not a good idea. I think :)

yeah sure.
I would like also to get on that solution on that problem.

@didiermun
Copy link

Been seeing this warning lately, not sure what has led to it
Screenshot 2021-01-23 at 2 06 58 pm
Presumably it's something that can be resolved in the rollup config

but where 🤔

when you are running the sapper project it will

@dok42
Copy link

dok42 commented Apr 18, 2021

Hi, I just updated Sapper to 0.29.1 and I get this message
No directory provided. Skipping CSS generation, as in the screenshots above.

What's the issue and.. how could I fix that ?

@babichjacob
Copy link
Member

Hi, I just updated Sapper to 0.29.1 and I get this message
No directory provided. Skipping CSS generation, as in the screenshots above.

What's the issue and.. how could I fix that ?

[Disclaimer: I did not test to see if the latest version of the Sapper template still results in this warning]

If you aren't using the latest version of this Sapper template, then your config hasn't been updated to avoid the warning. So, start over using the latest version of the template or compare its config files and dependencies to yours to see if you can solve the error without starting over.

@dok42
Copy link

dok42 commented Apr 18, 2021

Hi, I just updated Sapper to 0.29.1 and I get this message
No directory provided. Skipping CSS generation, as in the screenshots above.
What's the issue and.. how could I fix that ?

[Disclaimer: I did not test to see if the latest version of the Sapper template still results in this warning]

If you aren't using the latest version of this Sapper template, then your config hasn't been updated to avoid the warning. So, start over using the latest version of the template or compare its config files and dependencies to yours to see if you can solve the error without starting over.

The message No directory provided. Skipping CSS generation showed up after I updated the packages to the latest version available.
I did solve going "back" to the Sapper template packages version.

working

@silllli
Copy link

silllli commented May 28, 2021

A fix has been merged to the master branch, but hasn’t been released yet. To get Sapper with the latest commits (even if not part of a tagged version) you can install it directly from the master branch on GitHub:
npm install -D sveltejs/sapper#master

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

Successfully merging a pull request may close this issue.

9 participants