Skip to content

production assets:precompile failed, Unexpected identifier "async" #2364

Closed
@activeliang

Description

@activeliang

repo: (webpacker + vue + vuetify + capistrano)
https://github.com/activeliang/testing-webpacker-vue-vuetify

For sass configuration of vuetify, I refer to here: https://github.com/Rails/WebPacker/Issues/2235#IssueComment-524527397
Vuetify is work ( a - la - carte setup )

All this works on my mac, but when I deploy it, I always fail with the following message:

Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as [email protected]: rake exit status: 1
rake stdout: yarn install v1.19.0
[1/4] Resolving packages...
success Already up-to-date.
$ npm rebuild node-sass

> [email protected] install /home/deploy/test_vuetify/releases/20191112093029/node_modules/node-sass
> node scripts/install.js

node-sass build Binary found at /home/deploy/test_vuetify/releases/20191112093029/node_modules/node-sass/vendor/linux-x64-48/binding.node

> [email protected] postinstall /home/deploy/test_vuetify/releases/20191112093029/node_modules/node-sass
> node scripts/build.js

Binary found at /home/deploy/test_vuetify/releases/20191112093029/node_modules/node-sass/vendor/linux-x64-48/binding.node
Testing binary
Binary is fine
[email protected] /home/deploy/test_vuetify/releases/20191112093029/node_modules/node-sass
Done in 6.63s.
Compiling…
Compilation failed:
/home/deploy/test_vuetify/releases/20191112093029/node_modules/sass/node_modules/chokidar/index.js:121
  async remove(item) {
        ^^^^^^

SyntaxError: Unexpected identifier
    at NativeCompileCache._moduleCompile (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/deploy/test_vuetify/releases/20191112093029/node_modules/sass/sass.dart.js:98:17)
    at Module._compile (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/deploy/test_vuetify/releases/20191112093029/config/webpack/environment.js:25:29)
    at Module._compile (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/deploy/test_vuetify/releases/20191112093029/config/webpack/production.js:3:21)
    at Module._compile (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at WEBPACK_OPTIONS (/home/deploy/test_vuetify/releases/20191112093029/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
    at requireConfig (/home/deploy/test_vuetify/releases/20191112093029/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
    at /home/deploy/test_vuetify/releases/20191112093029/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
    at Array.forEach (native)
rake stderr: Nothing written


** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:


    at Module._compile (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)

    at Object.Module._extensions..js (module.js:586:10)

    at Module.load (module.js:494:32)

    at tryModuleLoad (module.js:453:12)

    at Function.Module._load (module.js:445:3)

    at Module.require (module.js:504:17)

    at require (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)

    at Object.<anonymous> (/home/deploy/test_vuetify/releases/20191112093029/config/webpack/production.js:3:21)

    at Module._compile (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)

    at Object.Module._extensions..js (module.js:586:10)

    at Module.load (module.js:494:32)

    at tryModuleLoad (module.js:453:12)

    at Function.Module._load (module.js:445:3)

    at Module.require (module.js:504:17)

    at require (/home/deploy/test_vuetify/releases/20191112093029/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)

    at WEBPACK_OPTIONS (/home/deploy/test_vuetify/releases/20191112093029/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)

    at requireConfig (/home/deploy/test_vuetify/releases/20191112093029/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)

    at /home/deploy/test_vuetify/releases/20191112093029/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17

    at Array.forEach (native)

I google search for a long time, still did not solve. Stranger to webpack, does anyone know the solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions