microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.89k stars 28.75k forks source link

No @types/node module in package.json #26638

Closed wenshiqi0 closed 7 years ago

wenshiqi0 commented 7 years ago

Steps to Reproduce:

  1. git clone
  2. ./scripts/npm.sh install
  3. npm run compile

error about not find module @types/node

So did you use @types/node as a global module and not add to the package.json?

egamma commented 7 years ago

@wenshiqi0 you run a script from your package.json and the error is related to this script. Can you add the package.json you are using?

Tyriar commented 7 years ago

Closing due to inactivity.

wenshiqi0 commented 7 years ago

@egamma

Sorry for too late.

{
  "name": "code-oss-dev",
  "version": "1.11.0",
  "electronVersion": "1.4.6",
  "distro": "612d0710388e5aad15b430be26f86d86ddfd1abd",
  "author": {
    "name": "Microsoft Corporation"
  },
  "main": "./out/main",
  "private": true,
  "scripts": {
    "test": "mocha",
    "start": "electron ./out/main",
    "preinstall": "node build/npm/preinstall.js",
    "postinstall": "node build/npm/postinstall.js",
    "compile": "gulp compile --max_old_space_size=4096",
    "watch": "gulp watch --max_old_space_size=4096",
    "monaco-editor-setup": "node scripts/monaco-editor-setup.js",
    "monaco-editor-test": "mocha --only-monaco-editor",
    "precommit": "node build/gulpfile.hygiene.js"
  },
  "dependencies": {
    "applicationinsights": "0.17.0",
    "chokidar": "bpasero/chokidar#vscode",
    "devtron": "^1.4.0",
    "emmet": "ramya-rao-a/emmet#vscode",
    "fast-plist": "0.1.2",
    "gc-signals": "^0.0.1",
    "getmac": "1.0.7",
    "graceful-fs": "4.1.11",
    "http-proxy-agent": "0.2.7",
    "https-proxy-agent": "0.3.6",
    "iconv-lite": "0.4.15",
    "jschardet": "^1.4.2",
    "minimist": "1.2.0",
    "native-keymap": "1.2.1",
    "node-pty": "0.6.2",
    "semver": "4.3.6",
    "v8-profiler": "jrieken/v8-profiler#vscode",
    "vscode-debugprotocol": "1.18.0",
    "vscode-ripgrep": "0.0.11",
    "vscode-textmate": "^3.1.1",
    "winreg": "1.2.0",
    "xterm": "Tyriar/xterm.js#vscode-release/1.11",
    "yauzl": "2.3.1"
  },
  "devDependencies": {
    "@types/minimist": "^1.2.0",
    "@types/mocha": "^2.2.39",
    "@types/node": "^7.0.18",
    "@types/semver": "^5.3.30",
    "@types/sinon": "^1.16.34",
    "@types/winreg": "^1.2.30",
    "azure-storage": "^0.3.1",
    "clean-css": "3.4.6",
    "coveralls": "^2.11.11",
    "cson-parser": "^1.3.3",
    "debounce": "^1.0.0",
    "documentdb": "^1.5.1",
    "eslint": "^3.4.0",
    "event-stream": "^3.1.7",
    "express": "^4.13.1",
    "flatpak-bundler": "^0.1.1",
    "glob": "^5.0.13",
    "gulp": "^3.8.9",
    "gulp-atom-electron": "^1.9.0",
    "gulp-azure-storage": "^0.7.0",
    "gulp-bom": "^1.0.0",
    "gulp-buffer": "0.0.2",
    "gulp-concat": "^2.6.0",
    "gulp-cssnano": "^2.1.0",
    "gulp-filter": "^3.0.0",
    "gulp-flatmap": "^1.0.0",
    "gulp-image-resize": "^0.10.0",
    "gulp-json-editor": "^2.2.1",
    "gulp-mocha": "^2.1.3",
    "gulp-remote-src": "^0.4.0",
    "gulp-rename": "^1.2.0",
    "gulp-replace": "^0.5.4",
    "gulp-shell": "^0.5.2",
    "gulp-sourcemaps": "^1.11.0",
    "gulp-tsb": "^2.0.3",
    "gulp-tslint": "^7.0.1",
    "gulp-uglify": "^2.0.0",
    "gulp-util": "^3.0.6",
    "gulp-vinyl-zip": "^1.2.2",
    "husky": "^0.13.1",
    "innosetup-compiler": "^5.5.60",
    "is": "^3.1.0",
    "istanbul": "^0.3.17",
    "jsdom-no-contextify": "^3.1.0",
    "lazy.js": "^0.4.2",
    "mime": "1.2.11",
    "minimatch": "^2.0.10",
    "mkdirp": "^0.5.0",
    "mocha": "^2.2.5",
    "object-assign": "^4.0.1",
    "optimist": "0.3.5",
    "pump": "^1.0.1",
    "queue": "3.0.6",
    "remap-istanbul": "^0.6.4",
    "rimraf": "^2.2.8",
    "sinon": "^1.17.2",
    "source-map": "^0.4.4",
    "tslint": "^4.3.1",
    "typescript": "2.1.5",
    "typescript-formatter": "4.0.1",
    "uglify-js": "2.4.8",
    "underscore": "^1.8.2",
    "vinyl": "^0.4.5",
    "vinyl-fs": "^2.4.3",
    "vscode-nls-dev": "^2.0.1"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/Microsoft/vscode.git"
  },
  "bugs": {
    "url": "https://github.com/Microsoft/vscode/issues"
  },
  "optionalDependencies": {
    "windows-foreground-love": "0.1.0",
    "windows-mutex": "^0.2.0",
    "fsevents": "0.3.8"
  }
}

This is the package.json. As I run gulp compile, without @types/node. I'll get those errors.

2017-05-22 2 23 53

The error is from https://github.com/Microsoft/vscode/blob/master/extensions/gulp/src/typings/refs.d.ts#L8

Tyriar commented 7 years ago

Moving to @dbaeumer who owns extensions/gulp

dbaeumer commented 7 years ago

@wenshiqi0 the import to @type/node is used in many exensions so I don't see why this should fail only for gulp.

I tried to reproduce this under Windows without any luck.

@isidorn can you please try under Mac. Our build run successful so this can only be a problem with running out of source.

isidorn commented 7 years ago

Works fine for me when doing ./scripts/npm.sh install and npm run compile out of source screen shot 2017-05-24 at 10 44 55

wenshiqi0 commented 7 years ago

I git pull the code and tried npm run compile, and get much more errors.

2017-05-25 4 04 16

It seems that it is not only from gulp extension.

I change to the master branch, and I tried not to change anything from vscode but still get the same things

dbaeumer commented 7 years ago

@wenshiqi0 something looks wired. I recommend to do a git clean -xfd node_modules and a git clean -xfd exensions and a git clean -xfd .build

Then run scripts\npm install again.

@isidorn thanks for testing this.

vscodebot[bot] commented 7 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our guidelines for filing issues. Thank you for your contributions.