Cannot read property 'content' of null
See original GitHub issueSteps to reproduce on Ubuntu 20.04, node 14 (but also tested on node 12 and with angular feature added first to the workspace).
cd /tmp
npx create-nx-workspace myworkspace
choose empty and Nx
cd myworkspace
yarn add --dev @nstudio/xplat
yarn nx generate app
choose mobile, nativescript, Yes, angular, Yes, blah.
You will get Cannot read property 'content' of null
.
What am I please doing wrong? Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >"Cannot read property 'content' of null": Psuedo Elements
I'm getting a "cannot read property 'content' of null error, implying there's something wrong with the DOM call. The code involves adding ...
Read more >TypeError: Cannot read property 'value' of Null in JS
To solve the "Cannot read property 'value' of null" error, make sure that the JS script tag is placed at the bottom of...
Read more >vue-loader error with script setup: Cannot read property ...
This seems to be caused by an outdated version of eslint-plugin-vue . Please update it to the latest version.
Read more >Cannot read property 'content' of null - components - Vue Forum
Hello! Here is my Button.vue component (css hidden): <template> <input :type="type" :class="is" :value="text" @click="click" /> </template> ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. To solve this I did a bit of a hack. Before running npx nx generate app I created a tsconfig.json file in the workspace root. The contents are as follows:
{ "extends": "./tsconfig.base.json" }
That’s it. Now when you run npx nx generate app - everything should go smoothly. I tested in with both Angular and Nativescript installations. Seems to work fine. I made an installation youtube video which describes the steps here. https://youtu.be/5imR7aaruTcActually scratch that I tested some more, and it seems to be in: ./node_modules/@nstudio/xplat/src/utils/general.js starting at line 81. I added a console.log there. Code like this:
When trying to build a project - I got the following:
? What name would you like for this app? test2 ? What type of app would like to create? web [Web app] ? Would you like to configure routing for this app? Yes General 83 nx.json General 83 package.json ? Which frontend framework should it use? angular [Angular app] ? Use xplat supporting architecture? Yes General 83 nx.json General 83 package.json General 83 package.json General 83 package.json ✔ Packages installed successfully. ? In which directory should the app be generated? ? Which stylesheet format would you like to use? CSS General 83 nx.json General 83 package.json General 83 nx.json General 83 package.json Xplat.js 500 General 83 nx.json General 83 package.json General 83 nx.json General 83 tsconfig.json Cannot read property ‘content’ of null
Looks like a problem with tree and tsconfig.json. In a new version tsconfig.json at workspace root is renamed to tsconfig.base.json