Comments (9)
Seems like this is something where you have to do the nasty thing known as declaration merging :(
declare namespace NodeJS {
export interface Process {
client: boolean
server: boolean
}
}
dropping the above into your index.d.ts seems to fix it.
from typescript-template.
@husayt Lol your node_modules
seems to be broken. nuxt-ts-edge
should'nt have @nuxt
inside it π. Try resintalling all your dependencies
from typescript-template.
In latest nuxt-edge @kevinmarrec had added typings for process, but i still get the following error in nuxt.config.ts
Property 'static' does not exist on type 'Process'.
from typescript-template.
@husayt You're probably missing "@nuxt/vue-app-edge"
in tsconfig.json
.
Here is my current tsconfig.json
:
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"lib": [
"esnext",
"esnext.asynciterable",
"dom"
],
"esModuleInterop": true,
"experimentalDecorators": true,
"sourceMap": true,
"strict": true,
"noImplicitAny": true,
"noEmit": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"baseUrl": ".",
"paths": {
"~/*": [
"./*"
]
},
"types": [
"@types/node",
"@nuxt/vue-app-edge"
]
}
}
It will bee soon become
{
"extends": "nuxt-ts-edge"
}
So that everything work out of the box with default values in the extended tsconfig.json
.
from typescript-template.
Thanks @kevinmarrec.
I tried "types": ["@types/node", "@nuxt/vue-app-edge"]
and it didn't work.
and then i changed it to
"types": ["@types/node", "nuxt-ts-edge/node_modules/@nuxt/vue-app-edge"]
and that worked.
It's bit ugly bot does the job. Might be a good idea to add @nuxt to peer/high level dependency of nuxt-ts-edge
.
from typescript-template.
Is it valid to close this bug until it's really fixed in a stable version of Nuxt?
from typescript-template.
@kevinmarrec indeed damn NPM. Thank you very much.
By the way, I had finally some time to port hackernews to TS and commit it here
Your feedback will be most appreciated.
from typescript-template.
@husayt Will give my feedback when I'll find some time ;) Thanks for working on it !
from typescript-template.
Hi guys, any update? Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node
.
from typescript-template.
Related Issues (20)
- How to include vuetify package? HOT 1
- How do i can debug it in VS Code? HOT 1
- Interface 'NuxtApp' incorrectly extends interface 'Vue'. Types of property '$loading' are incompatible. HOT 2
- GitHub issue template points to wrong CMTY app address HOT 1
- When using this inside the head() function of a component, this does not let you access computed HOT 4
- Action Required: Fix Renovate Configuration
- Dependency Dashboard
- Any plans to upgrade @nuxtjs/composition-api to 0.33.0? HOT 1
- Nuxt 3 Support HOT 2
- [Critical] - Build is failing. Missing dependency nuxt-property-decorator HOT 27
- vue-dev-tools do not work HOT 4
- Nuxt Edge - Issue when running/building the project HOT 4
- Nuxt.js fetch functionality HOT 1
- Update TypeScript HOT 1
- Update TypeScript version HOT 3
- Not compatible with nuxt 2.0.0 HOT 12
- asyncData not working HOT 1
- TypeScript template has error when installing in latest version HOT 4
- axios ηΌθΎε¨δΈη΄ζ₯ι HOT 1
- Fresh Installed and got this error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-template.