question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cant resolve .linariacache

See original GitHub issue

Do you want to request a feature or report a bug? bug

What is the current behavior? webpack throws error Can’t resolve ‘C:my-project.linaria-cachesrcApp.linaria.css’ in ‘C:\my-project\src’ configuration .babelrc { "presets": [ "@babel/preset-env", "@babel/preset-typescript", "@babel/preset-react", "linaria/babel" ], "plugins": [ ["@babel/plugin-proposal-decorators", { "legacy": true }], ["@babel/plugin-proposal-class-properties", { "loose": true }], "react-hot-loader/babel" ] } rules for webpack { test: /\.css$/, use: [ { loader: 'style-loader' }, { loader: 'css-loader', options: { sourceMap: !isProd, }, }, ], }, { test: /\.(j|t)sx?$/, exclude: /node_modules/, use: [ { loader: 'babel-loader' }, { loader: 'linaria/loader', options: { sourceMap: !isProd }, } ]

“linaria”: “^1.0.0-beta.0” “webpack”: “^4.23.1”,

OS - windows 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Jan 7, 2019

@satya164 Yes, seems to be working fine. Thanks for looking into it!

0reactions
satya164commented, Jan 7, 2019

Maybe it’s how Webpack handles absolute paths on Windows? From this issue, looks like we need to escape the slashes: https://github.com/webpack/webpack/issues/66

So we need to insert: C:\\my-project\\.linaria-cache\\src\\App.linaria.css instead of C:\my-project\.linaria-cache\src\App.linaria.css.

Can you try this branch and tell me if it works @mfarhadpur? https://github.com/callstack/linaria/tree/%40satya164/win-path

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next.js × linariaでビルド時にキャッシュが見つからないエラー ...
18:40:11.531 ModuleNotFoundError: Module not found: Error: Can't resolve '../.linaria-cache/pages/404.linaria.module.css' in ...
Read more >
@linaria/webpack-loader - npm
Blazing fast zero-runtime CSS in JS library. Latest version: 4.1.10, last published: 18 days ago. Start using @linaria/webpack-loader in ...
Read more >
node.js - Can't resolve 'babel-loader' - Stack Overflow
resolveLoader has an unknown property 'modulesDirectories'. These properties are valid: object { alias?, aliasFields?, cachePredicate?, ...
Read more >
@linaria/webpack-loader examples - CodeSandbox
Learn how to use @linaria/webpack-loader by viewing and forking @linaria/webpack-loader example apps on CodeSandbox.
Read more >
Linaria - Best of JS
Linaria can be used with any framework, with additional helpers for React. The basic syntax looks like this: import { css } from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found