HablemosDeVueJS / doctor-vue

Resolución de problemas que ocurren al desarrollar en VueJS
2 stars 1 forks source link

App de Vue + TS no hace deploy en AWS #5

Closed rolandoesc closed 4 years ago

rolandoesc commented 4 years ago

Estoy tratando de subir mi aplicación a AWS, pero en el build falla indicándome este error:

                                    throw err;
                                    ^
                                    Error: Cannot find module '@vue/cli-plugin-typescript'
                                    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
                                    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
                                    at Module.require (internal/modules/cjs/loader.js:690:17)
                                    at require (internal/modules/cjs/helpers.js:25:18)
                                    at idToPlugin (/codebuild/output/src191761359/src/portal-front/node_modules/@vue/cli-service/lib/Service.js:138:14)
                                    at Object.keys.concat.filter.map.id (/codebuild/output/src191761359/src/portal-front/node_modules/@vue/cli-service/lib/Service.js:178:20)
                                    at Array.map (<anonymous>)
                                    at Service.resolvePlugins (/codebuild/output/src191761359/src/portal-front/node_modules/@vue/cli-service/lib/Service.js:164:10)
                                    at new Service (/codebuild/output/src191761359/src/portal-front/node_modules/@vue/cli-service/lib/Service.js:34:25)
                                    at Object.<anonymous> (/codebuild/output/src191761359/src/portal-front/node_modules/@vue/cli-service/bin/vue-cli-service.js:16:17)

package.json:

{
  "name": "portal-front",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "prebuild": "npm install"
  },
  "dependencies": {
    "@sentry/browser": "^5.6.3",
    "@sentry/integrations": "^5.6.1",
    "@types/dotenv": "^8.2.0",
    "axios": "^0.19.0",
    "chilli-pepper": "^1.2.0",
    "core-js": "^2.6.5",
    "dgram": "^1.0.1",
    "dotenv": "^8.2.0",
    "radclient": "^1.0.0",
    "radius": "^1.1.4",
    "vue": "^2.6.10",
    "vue-axios": "^2.1.5",
    "vue-class-component": "^7.0.2",
    "vue-property-decorator": "^8.3.0",
    "vue-resource": "^1.5.1",
    "vue-router": "^3.0.3",
    "vuetify": "^1.5.5",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.9.0",
    "@vue/cli-plugin-eslint": "^3.9.0",
    "@vue/cli-plugin-typescript": "^4.0.5",
    "@vue/cli-service": "^3.9.0",
    "@vue/eslint-config-typescript": "^4.0.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.1",
    "typescript": "~3.5.3",
    "vue-cli-plugin-vuetify": "^0.5.0",
    "vue-template-compiler": "^2.6.10",
    "vuetify-loader": "^1.0.5"
  }
}

¿Tienen idea de qué pueda ser?

rolandoesc commented 4 years ago

Último log del error:

2019-11-19T23:55:23.283Z [INFO]: Git SSH Key acquired
2019-11-19T23:55:23.373Z [INFO]: # Cloning repository: git@bitbucket.org:XXXX/XXXfront.git
2019-11-19T23:55:23.509Z [INFO]: Agent pid 70
2019-11-19T23:55:23.514Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
2019-11-19T23:55:23.711Z [INFO]: Cloning into 'portal-front'...
2019-11-19T23:55:23.997Z [INFO]: Warning: Permanently added the RSA host key for IP address '18.205.93.1' to the list of known hosts.
2019-11-19T23:55:26.032Z [INFO]: # Switching to commit: c44492e7cfddb80e5873435893c34df502e12645
2019-11-19T23:55:26.142Z [INFO]: Note: checking out 'c44492e7cfddb80e5873435893c34df502e12645'.
                                 You are in 'detached HEAD' state. You can look around, make experimental
                                 changes and commit them, and you can discard any commits you make in this
                                 state without impacting any branches by performing another checkout.
                                 If you want to create a new branch to retain commits you create, you may
                                 do so (now or later) by using -b with the checkout command again. Example:
                                 git checkout -b <new-branch-name>
                                 HEAD is now at c44492e WIP(package.json): Adding vuecli to prebuild
2019-11-19T23:55:26.143Z [INFO]: # Checking for Git submodules at: /codebuild/output/src378417213/src/portal-front/.gitmodules
2019-11-19T23:55:26.167Z [INFO]: # Retrieving cache...
2019-11-19T23:55:26.207Z [INFO]: # Extracting cache...
2019-11-19T23:55:26.215Z [INFO]: # Extraction completed
2019-11-19T23:55:26.216Z [INFO]: # Retrieving environment cache...
2019-11-19T23:55:26.259Z [INFO]: # Retrieved environment cache
2019-11-19T23:55:33.810Z [INFO]: ## Starting Frontend Build
                                 # Starting phase: preBuild
                                 # Executing command: npm install
2019-11-19T23:55:43.051Z [INFO]: > yorkie@2.0.0 install /codebuild/output/src378417213/src/portal-front/node_modules/yorkie
                                 > node bin/install.js
2019-11-19T23:55:43.110Z [INFO]: CI detected, skipping Git hooks installation
2019-11-19T23:55:43.149Z [INFO]: > core-js@2.6.9 postinstall /codebuild/output/src378417213/src/portal-front/node_modules/core-js
                                 > node scripts/postinstall || echo "ignore"
2019-11-19T23:55:43.203Z [INFO]: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
2019-11-19T23:55:43.204Z [INFO]: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
2019-11-19T23:55:43.204Z [INFO]: > https://opencollective.com/core-js 
                                 > https://www.patreon.com/zloirock 
                                 Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
2019-11-19T23:55:44.029Z [WARNING]: npm WARN The package @vue/cli-plugin-typescript is included as both a dev and production dependency.
2019-11-19T23:55:44.030Z [WARNING]: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
                                    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2019-11-19T23:55:44.032Z [INFO]: added 770 packages from 529 contributors and audited 36482 packages in 9.479s
2019-11-19T23:55:44.033Z [INFO]: found 4 vulnerabilities (1 low, 3 moderate)
                                 run `npm audit fix` to fix them, or `npm audit` for details
2019-11-19T23:55:44.044Z [INFO]: # Completed phase: preBuild
                                 # Starting phase: build
2019-11-19T23:55:44.044Z [INFO]: # Executing command: npm run build
2019-11-19T23:55:44.224Z [INFO]: > portal-front@0.1.0 prebuild /codebuild/output/src378417213/src/portal-front
                                 > npm install -g @vue/cli && npm install
2019-11-19T23:56:03.968Z [WARNING]: npm WARN deprecated core-js@2.6.10: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
2019-11-19T23:56:27.168Z [INFO]: /root/.nvm/versions/node/v10.16.0/bin/vue -> /root/.nvm/versions/node/v10.16.0/lib/node_modules/@vue/cli/bin/vue.js
2019-11-19T23:56:27.297Z [INFO]: > core-js@2.6.10 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@vue/cli/node_modules/babel-polyfill/node_modules/core-js
                                 > node postinstall || echo "ignore"
2019-11-19T23:56:27.357Z [INFO]: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
                                 The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
                                 > https://opencollective.com/core-js 
                                 > https://www.patreon.com/zloirock 
                                 Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
2019-11-19T23:56:27.362Z [INFO]: > core-js@2.6.10 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@vue/cli/node_modules/babel-runtime/node_modules/core-js
                                 > node postinstall || echo "ignore"
2019-11-19T23:56:27.428Z [INFO]: > core-js@3.4.1 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@vue/cli/node_modules/core-js
                                 > node postinstall || echo "ignore"
2019-11-19T23:56:27.531Z [INFO]: > protobufjs@6.8.8 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@vue/cli/node_modules/protobufjs
                                 > node scripts/postinstall
2019-11-19T23:56:27.623Z [INFO]: > nodemon@1.19.4 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@vue/cli/node_modules/nodemon
                                 > node bin/postinstall || exit 0
2019-11-19T23:56:27.700Z [INFO]: Love nodemon? You can now support the project via the open collective:
                                 > https://opencollective.com/nodemon/donate
2019-11-19T23:56:27.712Z [INFO]: > ejs@2.7.4 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@vue/cli/node_modules/ejs
                                 > node ./postinstall.js
2019-11-19T23:56:27.769Z [INFO]: Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
2019-11-19T23:56:27.824Z [WARNING]: npm
2019-11-19T23:56:27.825Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/@vue/cli/node_modules/fsevents):
                                    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2019-11-19T23:56:27.828Z [INFO]: + @vue/cli@4.0.5
                                 added 1088 packages from 625 contributors in 43.239s
2019-11-19T23:56:32.800Z [WARNING]: npm
2019-11-19T23:56:32.802Z [WARNING]: WARN The package @vue/cli-plugin-typescript is included as both a dev and production dependency.
                                    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
                                    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2019-11-19T23:56:32.803Z [INFO]: audited 36482 packages in 4.601s
                                 found 4 vulnerabilities (1 low, 3 moderate)
                                 run `npm audit fix` to fix them, or `npm audit` for details
2019-11-19T23:56:32.816Z [INFO]: > portal-front@0.1.0 build /codebuild/output/src378417213/src/portal-front
                                 > vue-cli-service build
2019-11-19T23:56:32.819Z [WARNING]: sh: vue-cli-service: command not found
2019-11-19T23:56:32.820Z [WARNING]: npm ERR! file sh
                                    npm ERR!
2019-11-19T23:56:32.822Z [WARNING]: code ELIFECYCLE
                                    npm ERR! errno ENOENT
                                    npm ERR! syscall spawn
                                    npm ERR! portal-front@0.1.0 build: `vue-cli-service build`
                                    npm ERR! spawn ENOENT
                                    npm ERR!
                                    npm ERR! Failed at the portal-front@0.1.0 build script.
                                    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-11-19T23:56:32.830Z [WARNING]: npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /root/.npm/_logs/2019-11-19T23_56_32_822Z-debug.log
2019-11-19T23:56:32.830Z [HELP]: Outputting the npm debug log
                                 0 info it worked if it ends with ok
                                 1 verbose cli [ '/root/.nvm/versions/node/v10.16.0/bin/node',
                                 1 verbose cli   '/root/.nvm/versions/node/v10.16.0/bin/npm',
                                 1 verbose cli   'run',
                                 1 verbose cli   'build' ]
                                 2 info using npm@6.9.0
                                 3 info using node@v10.16.0
                                 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
                                 5 info lifecycle portal-front@0.1.0~prebuild: portal-front@0.1.0
                                 6 verbose lifecycle portal-front@0.1.0~prebuild: unsafe-perm in lifecycle true
                                 7 verbose lifecycle portal-front@0.1.0~prebuild: PATH: /root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/codebuild/output/src378417213/src/portal-front/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.6/bin:/usr/local/rvm/gems/ruby-2.4.6@global/bin:/usr/local/rvm/rubies/ruby-2.4.6/bin:/usr/local/rvm/bin:/root/.yarn/bin:/root/.config/yarn/global/node_modules/.bin:/root/.nvm/versions/node/v10.16.0/bin:/root/.local/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
                                 8 verbose lifecycle portal-front@0.1.0~prebuild: CWD: /codebuild/output/src378417213/src/portal-front
                                 9 silly lifecycle portal-front@0.1.0~prebuild: Args: [ '-c', 'npm install -g @vue/cli && npm install' ]
                                 10 silly lifecycle portal-front@0.1.0~prebuild: Returned: code: 0  signal: null
                                 11 info lifecycle portal-front@0.1.0~build: portal-front@0.1.0
                                 12 verbose lifecycle portal-front@0.1.0~build: unsafe-perm in lifecycle true
                                 13 verbose lifecycle portal-front@0.1.0~build: PATH: /root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/codebuild/output/src378417213/src/portal-front/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.6/bin:/usr/local/rvm/gems/ruby-2.4.6@global/bin:/usr/local/rvm/rubies/ruby-2.4.6/bin:/usr/local/rvm/bin:/root/.yarn/bin:/root/.config/yarn/global/node_modules/.bin:/root/.nvm/versions/node/v10.16.0/bin:/root/.local/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
                                 14 verbose lifecycle portal-front@0.1.0~build: CWD: /codebuild/output/src378417213/src/portal-front
                                 15 silly lifecycle portal-front@0.1.0~build: Args: [ '-c', 'vue-cli-service build' ]
                                 16 info lifecycle portal-front@0.1.0~build: Failed to exec build script
                                 17 verbose stack Error: portal-front@0.1.0 build: `vue-cli-service build`
                                 17 verbose stack spawn ENOENT
                                 17 verbose stack     at ChildProcess.<anonymous> (/root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
                                 17 verbose stack     at ChildProcess.emit (events.js:198:13)
                                 17 verbose stack     at maybeClose (internal/child_process.js:982:16)
                                 17 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
                                 18 verbose pkgid portal-front@0.1.0
                                 19 verbose cwd /codebuild/output/src378417213/src/portal-front
                                 20 verbose Linux 4.14.146-93.123.amzn1.x86_64
                                 21 verbose argv "/root/.nvm/versions/node/v10.16.0/bin/node" "/root/.nvm/versions/node/v10.16.0/bin/npm" "run" "build"
                                 22 verbose node v10.16.0
                                 23 verbose npm  v6.9.0
                                 24 error file sh
                                 25 error code ELIFECYCLE
                                 26 error errno ENOENT
                                 27 error syscall spawn
                                 28 error portal-front@0.1.0 build: `vue-cli-service build`
                                 28 error spawn ENOENT
                                 29 error Failed at the portal-front@0.1.0 build script.
                                 29 error This is probably not a problem with npm. There is likely additional logging output above.
                                 30 verbose exit [ 1, true ]
2019-11-19T23:56:32.833Z [ERROR]: !!! Build failed
2019-11-19T23:56:32.907Z [ERROR]: !!! Non-Zero Exit Code detected
2019-11-19T23:56:32.907Z [INFO]: # Starting environment caching...
2019-11-19T23:56:32.907Z [INFO]: # Environment caching completed
Terminating logging...
rolandoesc commented 4 years ago

Al parecer era un error de Amazon, volví a reinstalar el proyecto y ya funciona.