-
Notifications
You must be signed in to change notification settings - Fork 2.1k
.map sourcemap files missing from npm releases #2942
Comments
This error is occurring because we don't include the This is mostly harmless, since the However, it might be worth us considering including the |
Dear @kfranqueiro, can you either A) include .map files in npm packages or B) disable map generation in prod build reason is, that current setup where
is devtool: 'source-map', and
is Promise.all(globSync('build/*.{css,js}').map(cpAsset)).catch((err) => { causing, that generated minified files ends with sourceMappingURL /*# sourceMappingURL=mdc.drawer.min.css.map*/ but those files are not present in packages. But that is causing for example build warnings when we use mdc with aurelia-cli Error: An error occurred while trying to read the map file at /data/com__app/node_modules/@material/drawer/dist/mdc.drawer.js.map
Error: ENOENT: no such file or directory, open '/data/com__app/node_modules/@material/drawer/dist/mdc.drawer.js.map'
at readFromFileMap (/data/com__app/node_modules/aurelia-cli/lib/build/convert-source-map/index.js:32:11)
at new Converter (/data/com__app/node_modules/aurelia-cli/lib/build/convert-source-map/index.js:39:32)
at Object.exports.fromMapFileComment (/data/com__app/node_modules/aurelia-cli/lib/build/convert-source-map/index.js:112:10)
at Object.exports.fromMapFileSource (/data/com__app/node_modules/aurelia-cli/lib/build/convert-source-map/index.js:131:22)
at acquireSourceMapForDependency (/data/com__app/node_modules/aurelia-cli/lib/build/bundle.js:200:33)
at work.then (/data/com__app/node_modules/aurelia-cli/lib/build/bundle.js:222:25)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7) it's just warning, but because we include mdc packages one by one we get tons of those warnings and that make aurelia-cli output bloated with noise and as that hard to read. appreciate your time and efford required to solve this cosmetic issue Pavel |
Having the same issue @pavelsevcik .. 😞 |
@pndewit, I just submitted PR to add missing source-map files to npm releases in meantime, try this quick and dirty hack of aurelia-cli in node_modules in your project (if you have aurelia-cli installed globaly hack code in global location) add to function acquireSourceMapForDependency(file) {
if (!file || !file.path) {
return;
} this quick and dirty hack to exclude // WARNING: Hack / Workaround to supress Error: An error occurred while trying to read the map file
if (/node_modules\/@material/.test(file.path)) return; code gonna look like function acquireSourceMapForDependency(file) {
if (!file || !file.path) {
return;
}
// WARNING: Hack / Workaround to supress Error: An error occurred while trying to read the map file
if (/node_modules\/@material/.test(file.path)) return; cheers |
I'm a newbie with web technology?
The MDL is easy to use, but it's no longer to update.
The MDC-web is difficult for me and I can't find a step by step manual for general web server.
I always get errors when I run the code in general web server(like apache or nginx
not for Nodejs
).Do I need to install nodjs, npm and webpack?
errors: (sorry: I don't have any experience with MDC-Web)
Cannot find module
/dist/material-components-web.js.map
in package [email protected]Cannot find module
/dist/material-components-web.js.map
in package [email protected]the code
The text was updated successfully, but these errors were encountered: