Comments (10)
I removed @types/express-session
from devDependencies, then ran yarn install
. It worked.
Yarn does a pretty good job of flattening dependencies. Since @types/express-session
is a dependency of @types/connect-mongo
, it's not needed at the top level.
This fix works in this branch of my fork: https://github.com/UIUXEngineering/TypeScript-Node-Starter/tree/yarn-update-dep if you want test it.
I'm not going to submit a PR since owners don't want to use yarn: #33
from typescript-node-starter.
Great. Then please add a note on that in the usage/install docs and close this issue.
from typescript-node-starter.
If you want using yarn instead of npm, you can ignore errors by adding below options to tsconfig.json:
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"skipLibCheck": true,
Result of tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "es6",
"noImplicitAny": true,
"moduleResolution": "node",
"sourceMap": false,
"outDir": "dist",
"baseUrl": ".",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"skipLibCheck": true,
"paths": {
"*": [
"node_modules/*",
"src/types/*"
]
}
}
}
from typescript-node-starter.
Old issue but still actual for me.
I solved by running
yarn add --dev typescript@~4.3.2
since 4.4.x
trigger this issue
from typescript-node-starter.
I fixed this issue by running yarn import
this will create yarn.lock
for you based on project's package-lock.json
(more info) and then after having my yarn.lock
I deleted package-lock.json
from typescript-node-starter.
I'm here for the same reason.
from typescript-node-starter.
Is this still an issue?
from typescript-node-starter.
@peterblazejewicz Yes, It is still an issue for me #117
from typescript-node-starter.
I'm getting thousands of lint errors (incl. all dependencies) running npm run build
Installed dependencies using yarn
as I otherwise got an error trying to use npm install
➜ TypeScript-Node-Starter git:(master) npm install
/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:480
asyncWrite(afterWrite, stream, state, finished, cb);
^
TypeError: asyncWrite is not a function
at onwrite (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:480:7)
at WritableState.onwrite (/usr/local/lib/n
➜ TypeScript-Node-Starter git:(master) npm run build
... 1000s of linting errors!!
node_modules/@types/mongoose/index.d.ts:2840:5 - error TS2374: Duplicate string index signature.
Any suggestions!? :)
from typescript-node-starter.
Looks like the asyncWrite
error is quite a common issue
"You have to downgrade the node version to latest stable version i.e 8.11.2 because latest version of node is not compatible yet with all npm modules."
https://stackoverflow.com/questions/50597159/npm-err-asyncwrite-is-not-a-function
"I am guessing it is an incompatibility between npm v5 and node v10. To solve this I downgraded node to v9, upgraded npm to v6, then upgraded node to v10:"
sudo n 9.10.1
npm i -g npm
sudo n stable
Alternatively
sudo npm cache clean -f
sudo n 8.11.2
from typescript-node-starter.
Related Issues (20)
- README link to TypeScript Website's documentation is broken HOT 1
- client ts files and server ts files should compile to diffrent target HOT 3
- None of the tests pass. HOT 3
- Upgrade to TS 4.0 HOT 6
- Live demo is not working HOT 1
- :( Application Error If you are the application administrator, you can access the diagnostic resources. HOT 3
- Add a sample azure-pipelines.yml HOT 2
- Cannot read property 'picture' of undefined HOT 2
- Upgrade the connect-mongo package to v4 HOT 1
- To add more topics to this repository
- Checked out from master and audit still reported high severity vulnerability found.
- [Node] MongoError: E11000 duplicate key error collection HOT 1
- MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017 HOT 1
- Cannot GET /favicon.ico HOT 2
- Error(s) on update dependencies HOT 2
- The README.md live demo link is broken HOT 3
- User.ts - why Pre Middleware instead of setter for password? HOT 1
- Cannot find tsconfig.test.json HOT 1
- build failed HOT 4
- Error in development mode: req.session.returnTo = req.path; HOT 4
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-node-starter.