Windows重新格式化后无法启动服务器

时间:2017-04-01 04:02:00

标签: node.js angular ng2-bootstrap

重新格式化我的计算机并重新安装了node / npm +再次从github拉下我的项目,npm启动失败并输出以下内容(注意此代码仍在我的笔记本电脑上编译:

WARNING in ./~/jsdom/lib/jsdom/utils.js
216:21-40 Critical dependency: the request of a dependency is an expression

WARNING in ./~/jsdom/lib/jsdom/living/xmlhttprequest.js
20:23-30 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/ajv/lib/async.js
96:20-33 Critical dependency: the request of a dependency is an expression

WARNING in ./~/ajv/lib/async.js
119:15-28 Critical dependency: the request of a dependency is an expression

WARNING in ./~/ajv/lib/compile/index.js
13:21-34 Critical dependency: the request of a dependency is an expression

ERROR in ./~/jquery/lib/node-jquery.js
Module not found: Error: Can't resolve 'xmlhttprequest' in 'C:\Users\xaeda\Documents\lite-version\node_modules\jquery\lib'
 @ ./~/jquery/lib/node-jquery.js 8:28-53
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/jquery/lib/node-jquery.js
Module not found: Error: Can't resolve 'location' in 'C:\Users\xaeda\Documents\lite-version\node_modules\jquery\lib'
 @ ./~/jquery/lib/node-jquery.js 13:24-43
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/jquery/lib/node-jquery.js
Module not found: Error: Can't resolve 'navigator' in 'C:\Users\xaeda\Documents\lite-version\node_modules\jquery\lib'
 @ ./~/jquery/lib/node-jquery.js 17:25-45
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/jsdom/lib/jsdom.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\xaeda\Documents\lite-version\node_modules\jsdom\lib'
 @ ./~/jsdom/lib/jsdom.js 6:11-24
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/jsdom/lib/jsdom/browser/resource-loader.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\xaeda\Documents\lite-version\node_modules\jsdom\lib\jsdom\browser'
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js 7:11-24
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/tough-cookie/lib/cookie.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\xaeda\Documents\lite-version\node_modules\tough-cookie\lib'
 @ ./~/tough-cookie/lib/cookie.js 32:10-24
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/jsdom/lib/jsdom/living/xmlhttprequest.js
Module not found: Error: Can't resolve 'child_process' in 'C:\Users\xaeda\Documents\lite-version\node_modules\jsdom\lib\jsdom\living'
 @ ./~/jsdom/lib/jsdom/living/xmlhttprequest.js 4:18-42
 @ ./~/jsdom/lib/jsdom/browser/Window.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/jsdom/lib/jsdom/living/xhr-utils.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\xaeda\Documents\lite-version\node_modules\jsdom\lib\jsdom\living'
 @ ./~/jsdom/lib/jsdom/living/xhr-utils.js 5:11-24
 @ ./~/jsdom/lib/jsdom/living/xmlhttprequest.js
 @ ./~/jsdom/lib/jsdom/browser/Window.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/cssstyle/lib/CSSStyleDeclaration.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\xaeda\Documents\lite-version\node_modules\cssstyle\lib'
 @ ./~/cssstyle/lib/CSSStyleDeclaration.js 7:9-22
 @ ./~/jsdom/lib/jsdom/browser/Window.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/request/lib/har.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\xaeda\Documents\lite-version\node_modules\request\lib'
 @ ./~/request/lib/har.js 3:9-22
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/forever-agent/index.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\xaeda\Documents\lite-version\node_modules\forever-agent'
 @ ./~/forever-agent/index.js 6:10-24
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/forever-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'C:\Users\xaeda\Documents\lite-version\node_modules\forever-agent'
 @ ./~/forever-agent/index.js 7:10-24
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/tunnel-agent/index.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\xaeda\Documents\lite-version\node_modules\tunnel-agent'
 @ ./~/tunnel-agent/index.js 3:10-24
 @ ./~/request/lib/tunnel.js
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts

ERROR in ./~/tunnel-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'C:\Users\xaeda\Documents\lite-version\node_modules\tunnel-agent'
 @ ./~/tunnel-agent/index.js 4:10-24
 @ ./~/request/lib/tunnel.js
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./~/jquery/lib/node-jquery.js
 @ ./src/vendor.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:4200 ./src/vendor.browser.ts
Child html-webpack-plugin for "index.html":
    chunk    {0} index.html 545 kB [entry] [rendered]
        [0] ./~/lodash/lodash.js 540 kB {0} [built]
            [] -> factory:44ms building:2861ms = 2905ms
        [1] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 4.09 kB {0} [built]
             factory:69ms building:39ms = 108ms
        [2] (webpack)/buildin/global.js 509 bytes {0} [built]
            [] -> factory:51ms building:180ms = 231ms
        [3] (webpack)/buildin/module.js 517 bytes {0} [built]
            [] -> factory:51ms building:183ms = 234ms
webpack: Failed to compile.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:40:38
    A parameter initializer is only allowed in a function or constructor implementation.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:40:46
    Cannot find name 'keyof'.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:40:52
    '=' expected.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:42:46
    A parameter initializer is only allowed in a function or constructor implementation.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:42:56
    Cannot find name 'keyof'.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:42:62
    '=' expected.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:58:42
    Cannot find name 'Partial'.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:99:22
    Cannot find name 'Partial'.
[default] C:\Users\xaeda\Documents\lite-version\node_modules\@types\jasmine\index.d.ts:99:35
    Cannot find name 'Partial'.
[default] C:\Users\xaeda\Documents\lite-version\src\app\core\core.module.ts:14:55
    Module '"C:/Users/xaeda/Documents/lite-version/node_modules/ng2-bootstrap/index"' has no exported member 'DropdownModule'.
[default] C:\Users\xaeda\Documents\lite-version\src\app\shared\i18n\i18n.module.ts:7:9
    Module '"C:/Users/xaeda/Documents/lite-version/node_modules/ng2-bootstrap/index"' has no exported member 'DropdownModule'.
[default] C:\Users\xaeda\Documents\lite-version\src\app\shared\layout\header\header.module.ts:22:9
    Module '"C:/Users/xaeda/Documents/lite-version/node_modules/ng2-bootstrap/index"' has no exported member 'DropdownModule'.
[default] C:\Users\xaeda\Documents\lite-version\src\app\shared\layout\layout.module.ts:16:24
    Module '"C:/Users/xaeda/Documents/lite-version/node_modules/ng2-bootstrap/index"' has no exported member 'DropdownModule'.
[default] Checking finished with 13 errors

我的问题是为什么它能够在某些计算机上编译而不能在其他计算机上编译。 -v在两台计算机上的输出匹配:

λnpm-v 3.10.10

λ节点-v v6.10.1

尚未在此项目上运行NG。我尝试在本地和全局卸载@ angular2 / core和ng2-bootrap,我重新安装了node和npm。我的节点设置有些问题,或者它不能在我的其他计算机上构建和启动服务器。

0 个答案:

没有答案