One of the developers on my team came to me with an error he encountered while building our Nuxt 2.17.3 project. For me this came as a surprise as I never encountered the problem but after following a couple steps I also got the error:
- Removed node_modules
- Removed yarn lockfiles
- Cleaned yarn cache
- Execute the yarn command
Now we "suddenly" get the following fatal error:
Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
It looks like the error is with postcss. Even after carefully checking all package versions I can't seem to solve the problem.
The full error is as follows:
ERROR in ./assets/scss/master.scss (./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/nuxt/node_modules/postcss-loader/dist/cjs.js??ref--7-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!./assets/scss/master.scss)
Module build failed (from ./node_modules/nuxt/node_modules/postcss-loader/dist/cjs.js):
Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator.SourceMapGenerator_validateMapping [as _validateMapping] (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/source-map-js/lib/source-map-generator.js:276:15)
at SourceMapGenerator.SourceMapGenerator_addMapping [as addMapping] (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/source-map-js/lib/source-map-generator.js:110:12)
at /Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/source-map-js/lib/source-map-generator.js:72:17
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/source-map-js/lib/source-map-consumer.js:155:7)
at Function.SourceMapGenerator_fromSourceMap [as fromSourceMap] (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/source-map-js/lib/source-map-generator.js:48:24)
at MapGenerator.generateMap (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/nuxt/node_modules/postcss/lib/map-generator.js:101:37)
at MapGenerator.generate (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/nuxt/node_modules/postcss/lib/map-generator.js:85:19)
at new NoWorkResult (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/nuxt/node_modules/postcss/lib/no-work-result.js:33:46)
at Processor.process (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/nuxt/node_modules/postcss/lib/processor.js:51:14)
at runPostcss (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/postcss-import/lib/process-content.js:48:6)
at processContent (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/postcss-import/lib/process-content.js:42:10)
at /Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/postcss-import/index.js:382:20
at async Promise.all (index 0)
at async LazyResult.runAsync (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/nuxt/node_modules/postcss/lib/lazy-result.js:261:11)
at async Object.loader (/Users/REDACTED/REDACTED/REDACTED/REDACTED/REDACTED/node_modules/nuxt/node_modules/postcss-loader/dist/index.js:95:14)
@ ./assets/scss/master.scss 4:14-243
@ ./.nuxt/App.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./node_modules/nuxt/node_modules/@nuxt/components/lib/installComponents.js ./.nuxt/client.js
What could be the issue? I'm in despair! Many thanks in advance.
For this specific issue there was an issue with an imported css file from the
vue-selectpackage in ourmaster.scssfile. Hardcoding the contents of the vue-select css file into the master.scss solves the issue.