Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'transpileOptions' of undefined #406

Open
tpbradt opened this issue Aug 19, 2020 · 1 comment
Open

TypeError: Cannot read property 'transpileOptions' of undefined #406

tpbradt opened this issue Aug 19, 2020 · 1 comment

Comments

@tpbradt
Copy link

tpbradt commented Aug 19, 2020

Getting the below error during npm run build, with dependency on vue-cli-plugin-apollo 0.21.3. I get this failure on my Windows 10 machine, and also building it inside of the maven:3.6.3-amazoncorretto-11 docker image. But what's very puzzling is that one teammate is able to build this project successfully on his Windows 10 machine, and another teammate on his Mac. So it's inconsistent, likely with some kind of environmental issue. But since I encounter this in the maven docker image it obviously can be reproduced on linux.

Here is my stacktrace. (The ........... just represents the root path of my git project in Windows.)

vue-cli-service build --target lib --name nui-horizon-platform ./src/index.js

✔ Building for production as library (commonjs,umd,umd-min)...
ERROR TypeError: Cannot read property 'transpileOptions' of undefined
TypeError: Cannot read property 'transpileOptions' of undefined
at ..........................\node_modules\vue-cli-plugin-apollo\index.js:90:44
at Object.tap (..........................\node_modules\webpack-chain\src\Use.js:14:20)
at ..........................\node_modules\vue-cli-plugin-apollo\index.js:89:8
at ..........................\node_modules@vue\cli-service\lib\Service.js:236:40
at Array.forEach ()
at Service.resolveChainableWebpackConfig (..........................\node_modules@vue\cli-service\lib\Service.js:236:26)
at PluginAPI.resolveChainableWebpackConfig (..........................\node_modules@vue\cli-service\lib\PluginAPI.js:145:25)
at genConfig (..........................\node_modules@vue\cli-service\lib\commands\build\resolveLibConfig.js:32:24)
at module.exports (..........................\node_modules@vue\cli-service\lib\commands\build\resolveLibConfig.js:136:15)
at build (..........................\node_modules@vue\cli-service\lib\commands\build\index.js:140:50)

The devDependencies from my package.json are as follows:

"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.2",
"@vue/cli-plugin-pwa": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-unit-jest": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "1.0.0-beta.29",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"graphql-tag": "^2.9.0",
"jest-fetch-mock": "^3.0.3",
"jest-mock-axios": "^4.2.1",
"node-sass": "^4.12.0",
"peer-deps-externals-webpack-plugin": "^1.0.4",
"sass-loader": "^8.0.0",
"vue-cli-plugin-apollo": "^0.21.3",
"vue-template-compiler": "^2.6.10",
"webpack-bundle-analyzer": "^3.8.0",
"webpack-node-externals": "^1.7.2"

@iammandeep85
Copy link

Solution which worked:

  1. remove your current repo and clone fresh one.
  2. run your server it will run.
  3. transpile Options: https://stenciljs.com/docs/compiler-api
    you can read more about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants