koddr/bottle-vue-kickstart

NPM build errors

evangineer opened this issue · 3 comments

Got the following while running npm run build:

vagrant@vagrant:~/repos/bottle-vue-kickstart$ npm run build

> bottle-vue-kickstart@0.5.3 build /home/vagrant/repos/bottle-vue-kickstart
> webpack --config webpack.config.js --optimize-minimize --display-error-details --hide-modules --progress

Hash: 43a57558011b258d8d07
Version: webpack 3.12.0
Time: 4723ms
            Asset     Size  Chunks             Chunk Names
 js/script.min.js   153 kB       0  [emitted]  js/script.min.js
css/style.min.css  3.57 kB       1  [emitted]  css/style.min.css

ERROR in ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src!./node_modules/sass-loader/dist/cjs.js!./static/assets/scss/style.scss
Module build failed:
@import "~bulma/sass/utilities/derived-variables.sass";
^
      File to import not found or unreadable: ~bulma/sass/utilities/derived-variables.sass.
      in /home/vagrant/repos/bottle-vue-kickstart/static/assets/scss/style.scss (line 4, column 1)
Error:
@import "~bulma/sass/utilities/derived-variables.sass";
^
      File to import not found or unreadable: ~bulma/sass/utilities/derived-variables.sass.
      in /home/vagrant/repos/bottle-vue-kickstart/static/assets/scss/style.scss (line 4, column 1)
    at options.error (/home/vagrant/repos/bottle-vue-kickstart/node_modules/node-sass/lib/index.js:291:26)
 @ ./static/assets/scss/style.scss 2:14-180

ERROR in ./static/assets/scss/style.scss
Module build failed: ModuleBuildError: Module build failed:
@import "~bulma/sass/utilities/derived-variables.sass";
^
      File to import not found or unreadable: ~bulma/sass/utilities/derived-variables.sass.
      in /home/vagrant/repos/bottle-vue-kickstart/static/assets/scss/style.scss (line 4, column 1)
    at /home/vagrant/repos/bottle-vue-kickstart/node_modules/webpack/lib/NormalModule.js:195:19
    at /home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:111:13)    at Object.callback (/home/vagrant/repos/bottle-vue-kickstart/node_modules/sass-loader/dist/index.js:89:7)
    at Object.done [as callback] (/home/vagrant/repos/bottle-vue-kickstart/node_modules/neo-async/async.js:8077:18)
    at options.error (/home/vagrant/repos/bottle-vue-kickstart/node_modules/node-sass/lib/index.js:294:32)
 @ ./static/assets/scss/style.scss
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/dist/cjs.js!node_modules/postcss-loader/src/index.js!node_modules/sass-loader/dist/cjs.js!static/assets/scss/style.scss:

    ERROR in ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src!./node_modules/sass-loader/dist/cjs.js!./static/assets/scss/style.scss
    Module build failed:
    @import "~bulma/sass/utilities/derived-variables.sass";
    ^
          File to import not found or unreadable: ~bulma/sass/utilities/derived-variables.sass.
          in /home/vagrant/repos/bottle-vue-kickstart/static/assets/scss/style.scss (line 4, column 1)
    Error:
    @import "~bulma/sass/utilities/derived-variables.sass";
    ^
          File to import not found or unreadable: ~bulma/sass/utilities/derived-variables.sass.
          in /home/vagrant/repos/bottle-vue-kickstart/static/assets/scss/style.scss (line 4, column 1)
        at options.error (/home/vagrant/repos/bottle-vue-kickstart/node_modules/node-sass/lib/index.js:291:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! bottle-vue-kickstart@0.5.3 build: `webpack --config webpack.config.js --optimize-minimize --display-error-details --hide-modules --progress`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the bottle-vue-kickstart@0.5.3 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2020-09-01T10_49_56_673Z-debug.log

Okay, so I edited static/assets/scss/style.scss and changed the line from:

@import "~bulma/sass/utilities/derived-variables.sass";

to

@import "~bulma/sass/utilities/derived-variables.scss";

And that got past the error.

Now I'm getting:

vagrant@vagrant:~/repos/bottle-vue-kickstart$ npm run build

> bottle-vue-kickstart@0.5.3 build /home/vagrant/repos/bottle-vue-kickstart
> webpack --config webpack.config.js --optimize-minimize --display-error-details --hide-modules --progress

 14% building modules 36/37 modules 1 active ...ckstart/static/assets/scss/style.scss(node:1926) UnhandledPromiseRejectionWarning: TypeError: this.getResolve is not a function
    at Object.loader (/home/vagrant/repos/bottle-vue-kickstart/node_modules/css-loader/dist/index.js:62:27)
    at LOADER_EXECUTION (/home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
    at runSyncOrAsync (/home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
    at iterateNormalLoaders (/home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
    at iterateNormalLoaders (/home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:218:10)
    at /home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:233:3
    at context.callback (/home/vagrant/repos/bottle-vue-kickstart/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/vagrant/repos/bottle-vue-kickstart/node_modules/postcss-loader/src/index.js:197:9
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1926) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1926) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
koddr commented

@evangineer Hi!

Can you run this command on physical machine (not into Vagrant virtual machine)?

I fixed remaining build errors by upgrading to Webpack ^4.36.0 and replacing extract-text-webpack-plugin with mini-css-extract-plugin.