Articles of npm install

运行命令npm run dev时出错

我开始做一个新的应用程序的第一次,我安装了git和node.js,并设置path..从bitbucket的链接我克隆了项目,然后我给了npm install ..高兴这一切都很好,但是当我给了npm run dev ,这是抛出这个错误: 我认为这个问题与path有关,我不知道该怎么改变。 我的path如下所示: 论坛中的其他问题并不能解决我的问题。

运行`yarn`时如何更改主目录?

我有一个nodejs项目并使用yarn来构build它。 由于某些原因,用户主目录是只读的。 当我在我的项目中运行yarn install ,出现以下错误: error An unexpected error occurred: "EACCES: permission denied, mkdir '/home/jenkins/.config'". 似乎yarn正试图访问用户主目录。 如何限制yarn只能使用当前的应用程序目录? 我知道npm我可以使用下面的环境变化,但我不知道如何做yarn 。 export npm_config_cache=npm-cache

错误,当我部署ng build –prod Angular 4.3.2

我已经通过以下方式将angular度从4.0.0升级到4.3.2: npm install @angular/common@latest @angular/compiler@latest @angular/compiler-cli@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest typescript@latest rxjs@latest –save 然后我把ng serve和运作良好,但是当我想通过ng build –prod我有以下错误: [1m[33mWARNING in ./src/$$_gendir/app/app.module.ngfactory.ts 730:2-27 "export 'ɵNgModuleInjector' (imported as 'import0') was not found in '@angular/core'[39m[22m [1m[31mERROR in C:/Data/angular4/system/src/$$_gendir/node_modules/@angular/core/core.ngfactory.ts (11,49): Property 'ɵNgModuleInjector' does not exist on type 'typeof "C:/Data/angular4/system/node_modules/@angular/core/core"'.[39m[22m [1m[31mERROR in C:/Data/angular4/system/src/$$_gendir/node_modules/@angular/core/core.ngfactory.ts (41,79): Property 'parent' does […]

执行命令时发生错误:npm run serve

我已经尝试了所有的选项更改我的版本打字从“2.4.2”到“2.4.1”另外,我已经分别执行了“npm run serve”和“npm run build:watch”,但它不起作用。 我已经把环境放在了一起,但根本不起作用。 请帮忙解决这个问题。 同时运行cmd npm start下面的错误来了: 执行命令时发生错误:npm run serve 错误:产生cmd.exe ENOENT at exports._errnoException (util.js:1018:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) at Module.runMain (module.js:606:11) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:504:3 执行命令时发生错误:npm run serve Error: spawn cmd.exe ENOENT at exports._errnoException (util.js:1018:11)`enter code here` at Process.ChildProcess._handle.onexit […]

npm安装ts-md5错误

每当我在node.js命令提示符下执行npm install ts-md5命令时,我收到一个错误。 我不知道锄头来解决这个问题。 希望你能帮助我,在此先感谢这里是错误: C:\Users\Administrator>npm install ts-md5 C:\Users\Administrator +– UNMET PEER DEPENDENCY @angular/core@* +– UNMET PEER DEPENDENCY @ionic-native/core@^3.6.0 || >=4.0.0 +– UNMET PEER DEPENDENCY rxjs@^5.0.1 `– ts-md5@1.2.2 npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Administrator\ package.json' npm WARN @ionic-native/network@4.1.0 requires a peer of @ionic-native/core@^3.6. 0 || >=4.0.0 but none was installed. […]

在Rasp PI上的Ember JS

我在我的RASP Pi上尝试了Ember JS。 不幸的是,由于以下错误,我无法继续使用我的npm进行余烬安装: npm ERR! Error: No compatible version found: broccoli-merge-trees@'^2.0.0' npm ERR! Valid install targets: npm ERR! ["0.1.3","0.1.4","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","1.0.0","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","2.0.0"] npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:685:10) npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:607:10 npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7) npm ERR! at Object.oncomplete (fs.js:107:15) npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm […]

如何在ReactJs组件中调用oidc-client signinSilentCallback

我需要使用oidc-client或者redux-oidc npm node module实现Slient-Renew令牌。 我正在使用Identity Server版本3.0和Javascript ReactJs客户端UI应用程序(Webpack版本2) 。 我正在从github上下载一个简单的Javascript应用程序,Slient Renew HTML文件是 <!DOCTYPE html> <html> <head> <title>Silent Renew</title> <meta charset="utf-8" /> </head> <body> <script src="./oidc-client.js"></script> <script> new Oidc.UserManager().signinSilentCallback(); </script> </body> </html> 目前我创build了一个路线 <Route exact path='/SilentRenew' component={SilentRenew} /> 组件代码是 import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import UserManager from 'oidc-client'; […]

在NPM中包含依赖于package.json

我是新来的node.js我已经手动添加库到node_modules,而不使用命令行NPM安装…现在,我结束了很多没有包含在package.json中的库。 有无论如何自动添加从我的node_modules依赖我的package.json文件?

NPM package-lock.json导致npm install在Linux上失败

所以我刚更新了我的Mac上的NPM,并在一个项目上生成了一个locking文件。 “嘿 – 那太好了”我说,并且承诺。 然后,我的构build在Travis CI上失败,如下所示: Compiling Frontend Assets npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! Linux 4.4.0-83-generic npm ERR! argv "/home/travis/.nvm/versions/node/v7.4.0/bin/node" "/home/travis/.nvm/versions/node/v7.4.0/bin/npm" "install" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! shasum check failed for […]

NPM安装在networking共享文件夹UNCpath错误

我正在Intranet服务器的networking共享文件夹中创build一个项目。 我是一个初学者,我不知道该怎么做。 这就是我在package.json中获取的内容 { "name": "Test Project", "version": "0.0.1", "description": "My Test Project", "dependencies": { "animate.css": "3.5.2", "font-awesome": "4.7.0", "vue": "^2.2.2", "vue-axios": "^2.0.1", "admin-lte": "^2.3.11" }, "devDependencies": { "babel-core": "^6.1.2", "babel-loader": "^6.1.0", "babel-plugin-transform-runtime": "^6.1.2", "babel-preset-es2015": "^6.1.2", "babel-preset-stage-0": "^6.1.2", "babel-runtime": "^5.8.0", "webpack": "^1.12.2" }, "author": "Me" } 但是,安装中断和UNCpath错误发生。 我认为这与CMD无法读取networkingpath有关。 完整的执行结果: 任何解决方法?