-
Notifications
You must be signed in to change notification settings - Fork 106
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
v0.1.3 Sourcemap for "..node_modules/.vite/*.js" points to missing source files #129
Comments
Try using a newer version of Vite? |
I find that this can also happen when you update packages but the cache still has old files. Try |
I'm using the latest v2.6.13
The true is that even with this failing messages the storybook it will load ok and it seems to work fine. Don't understand what it means by I'm using monorepo approach and maybe it first tries to get from app/node_modules (core package) and raises this failing message and then tries to go to the expected package( |
The root cause of this might be what is being discussed here: vitejs/vite#5563 |
Can you check if this still happens with the very latest version of Vite? |
Hi @eirslett, I'm using the latest versions: I also noticed that if I run with the standard run (core with webpack configuration) and immediately after perform a vite builder run it works as it seems to take into consideration cached data provided by the first run. ( Standard Run:
const path = require("path");
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
// Based on: https://storybook.js.org/docs/react/configure/webpack#extending-storybooks-webpack-config
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-links", "@storybook/addon-essentials","storybook-addon-designs"],
webpackFinal: async (config) => {
// configuration to handle scss files when used within components consumed by a story
config.module.rules.push({
test: /\.scss$/,
use: ["style-loader", "css-loader", "sass-loader"],
include: path.resolve(__dirname, "../"),
});
config.resolve.plugins = [
...(config.resolve.plugins || []),
new TsconfigPathsPlugin({
extensions: config.resolve.extensions,
}),
];
// Return the altered config
return config;
}
};
info @storybook/react v6.3.12
info
info => Loading presets
info => Loading 1 config file in "/home/.../web/.storybook"
info => Loading 9 other files in "/home/.../web/.storybook"
info => Adding stories defined in "/home/.../web/.storybook/main.js"
info => Using implicit CSS loaders
info => Using default Webpack4 setup
(node:15854) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.
See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
(Use `node --trace-deprecation ...` to show where the warning was created)
10% building 1/1 modules 0 active
info => Using cached manager
webpack built preview c88a7cb9998e0cb2a68b in 22419ms
╭────────────────────────────────────────────────╮
│ │
│ Storybook 6.3.12 started │
│ 23 s for preview │
│ │
│ Local: http://localhost:6006/ │
│ On your network: http://localhost:6006/ │
│ │
╰────────────────────────────────────────────────╯ Vite Builder run (right after standard run):
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-links", "@storybook/addon-essentials","storybook-addon-designs"],
core: { builder: "storybook-builder-vite" }
};
info @storybook/react v6.3.12
info
info => Loading presets
Pre-bundling dependencies:
react
react-dom
@base2/pretty-print-object
@emotion/core
@emotion/is-prop-valid
(...and 69 more)
(this will be run only when your dependencies or config have changed)
info => Using cached manager
╭────────────────────────────────────────────────╮
│ │
│ Storybook 6.3.12 started │
│ 2.21 s for preview │
│ │
│ Local: http://localhost:6006/ │
│ On your network: http://localhost:6006/ │
│ │
╰────────────────────────────────────────────────╯ |
@eddpascoal I've got a PR up that I think should address this, but in the meantime, if you want, you can try removing any @bnussman that looks like a different issue. You'll want to make sure that all your dependencies are pre-bundled by vite. You can add them to your
|
Fixes #129 Updating the version of `@vitejs/plugin-react` removes the warnings about missing source files. See vitejs/vite#5438 (comment). I also was seeing these warnings, and updating made them disappear.
Hi,
I used v0.1.1 before and I didn't have any issue.. now that I'm using v0.1.3 I got this:
Sourcemap for "..node_modules/.vite/*.js" points to missing source files
error.Warning log:
I have a branch working with previous version 0.1.1:
And a non working branch with 0.1.3 and @storybook6.3.12
Any ideas what happened?
The text was updated successfully, but these errors were encountered: