GithubHelp home page GithubHelp logo

Comments (10)

jerryorta-dev avatar jerryorta-dev commented on May 22, 2024 6

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.

kristianmandrup avatar kristianmandrup commented on May 22, 2024 3

Great. Then please add a note on that in the usage/install docs and close this issue.

from typescript-node-starter.

mehdi-yeganeh avatar mehdi-yeganeh commented on May 22, 2024 2

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.

Eomm avatar Eomm commented on May 22, 2024 2

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.

omnajjar avatar omnajjar commented on May 22, 2024 1

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.

kahurangitama avatar kahurangitama commented on May 22, 2024

I'm here for the same reason.

from typescript-node-starter.

peterblazejewicz avatar peterblazejewicz commented on May 22, 2024

Is this still an issue?

carbon

from typescript-node-starter.

muditsaurabh avatar muditsaurabh commented on May 22, 2024

@peterblazejewicz Yes, It is still an issue for me #117

from typescript-node-starter.

kristianmandrup avatar kristianmandrup commented on May 22, 2024

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.

kristianmandrup avatar kristianmandrup commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.