Tag: npm

cross-env / dist / index.js:42意外标记}

一点背景:我正在开发一个Laravel 5应用程序。 我使用Homestead(使用Vagrant / VirtualBox)在Windows 7上本地开发,并通过CodePipeline部署到Amazon EC2实例。 在试图让Laravel Mix在本地工作的同时,我一直听到一些错误,最终导致我在全局安装cross-env的解决scheme,而不是将其包含在package.json中的devDependencies中。 当然,这也意味着我的Amazon部署也需要更新到该设置。 除了解释cross-env是全局安装在我的部署上的情况下(如果相关的话),这些都不是真正相关的。 我的package.json : { "private": true, "scripts": { … "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js –progress –hide-modules –config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.16.2", "bootstrap-sass": "^3.3.7", "jquery": "^3.1.1", "laravel-mix": "^1.0", "lodash": "^4.17.4", "vue": "^2.1.10" } } 我的部署到AWS在npm run production失败,出现以下错误: [stderr]/usr/lib/node_modules/cross-env/dist/index.js:42 [stderr] }); [stderr] ^ [stderr]SyntaxError: Unexpected token } […]

离子错误:找不到模块'dezalgo'

我正在尝试添加ios平台到我的项目,所以我可以在XCode中build立它。 我跑了下面的命令:ionic cordova platform add ios 这是我得到的错误: ionic cordova platform add ios > cordova platform add ios –save module.js:544 throw err; ^ Error: Cannot find module 'dezalgo' at Function.Module._resolveFilename (module.js:542:15) at Function.Module._load (module.js:472:25) at Module.require (module.js:585:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/chando/Documents/GIT/testproject/node_modules/cordova-lib/node_modules/npm/lib/utils/correct-mkdir.js:2:15) at Module._compile (module.js:641:30) at Object.Module._extensions..js (module.js:652:10) at Module.load (module.js:560:32) at tryModuleLoad (module.js:503:12) at […]

Node.js无法find模块,尽pipe模块正在安装

我将我的应用程序本地构build到dist文件夹中; package.json也被复制过来 npm install –production在dist文件夹中运行 dist文件夹然后压缩 邮编被上传到服务器,在那里解压缩 试图在服务器上运行应用程序导致Error: cannot find module <module_name> 除非我在解压缩后手动运行npm install <module_name> ,否则这个错误会发生在任何模块上 一切工作正常,如果我从我的dist文件夹中运行它,所以它不是一个问题与预压缩部分 在unzip之后运行npm install –production不能解决任何问题(只是说所有的模块都是最新的) 删除服务器上的node_modules ,然后运行npm install –production使一切工作正常 解压zip文件在本地然后运行应用程序工作正常 我错过了什么/错在哪里? 编辑:package.json: { "name": "app-name", "version": "0.0.1", "scripts": { "start": "index.js" }, "dependencies": { "body-parser": "^1.18.2", "email-validator": "^1.1.1", "express": "^4.16.2", "express-jwt": "^5.3.0", "express-jwt-permissions": "^1.0.0", "firebase-admin": "^5.5.1", "jsonwebtoken": "^8.1.0", "mailgun-js": "^0.13.1", […]

npm install命令在我的机器上失败

我试图运行npm install命令,但是连续失败。 我已经尝试安装最新版本8.9.3,但同样的问题发生。 节点版本:8.9.3 npm版本:4.6.1 错误: 你能build议如何清除这个问题?

使用NPM发出安装节点串行端口的问题

当我尝试运行NPM安装serialport时,出现此错误。 我可以安装其他模块,只是不serialport。 我对linux,node和npm相对缺乏经验,在这个问题上需要一些指导。 这是package.json中失败的命令 “cd serialport_native; node-waf configure build; cp build / default / serialport_native.node ../” 我有节点版本0.4.9和NPM版本1.0.15,并试图安装serialport版本0.2.8 administrator@ubuntu:~$ npm install serialport > serialport@0.2.8 install /home/administrator/node_modules/serialport > cd serialport_native;node-waf configure build;cp build/default/serialport_native.node ../ sh: node-waf: not found cp: cannot stat `build/default/serialport_native.node': No such file or directory npm ERR! error installing serialport@0.2.8 Error: serialport@0.2.8 install: `cd serialport_native;node-waf […]

socket.io:安装它的正确方法是什么?

我已经能够安装npm但是有很多事情似乎并不奏效。 我的第一个问题是这里发生了什么事情: steven@steven-VirtualBox:~/Documents/node$ sudo npm install socket.io node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: No such module at Object.<anonymous> (/usr/share/npm/lib/utils/output.js:8:21) at Module._compile (module.js:432:26) at Object..js (module.js:450:10) at Module.load (module.js:351:31) at Function._load (module.js:310:12) at Module.require (module.js:357:17) at require (module.js:368:17) at Object.<anonymous> (/usr/share/npm/lib/utils/log.js:21:14) at Module._compile (module.js:432:26) at Object..js (module.js:450:10) 我似乎最终在这里(第201行)。 […]

当节点已经被编译了前缀的时候如何安装npm

我已经使用git存储库从源安装节点。 节点的当前path是/ Users / toutpt / makina / cubes / parts / nodejs / bin / node 现在我得到了npm的来源,我不能在安装时指定使用此节点。 每个谷歌的结果都指出我要从/ usr / bin / node链接它,或者添加/ Users / toutpt / makina / cubes / parts / nodejs / bin作为全局PATH的一部分 我所有的尝试给我同样的错误:bin / npm:第5行:node:command not found 我不想要,因为系统限制,我无法在我的系统上使其成为全局的。 我想让每个项目都使用它自己的NPM节点。 我想通过使用它的path使用npm:/ Users / toutpt / makina / cubes / parts / […]

NodeJS npm – 在Windows上使用Contextify

我能够在Windows上使用node-gyp构buildcontextify 0.1.1,但是我不知道如何在parsing其他模块的依赖时使npm识别/使用这个版本。 'npm install'失败,同一个(预期的)'node-waf在这个时候是意外的。 错误,尽pipe在本地目录中有一个构build版本的symxtify。 简单地说:如何告诉npm使用我自己构build的模块,而不是尝试下载/构build自己的模块?

npm模块testing

我打算在野外发布一个Node模块,并想知道是否应该包含专门为testing框架(即mocha)使用而编写的testing或者使用常规节点(即node test.js)运行的testing。 对此有何共识?

node-expat导致npm与节点安装soap失败

我试图在Mac OSX上通过NPM安装节点js soap模块,试图手动安装,并指向expat.h等没有工作 npm安装肥皂 npm http GET https://registry.npmjs.org/soap npm http 304 https://registry.npmjs.org/soap npm http GET https://registry.npmjs.org/node-expat npm http GET https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/node-expat npm http 304 https://registry.npmjs.org/request > node-expat@1.6.0 install /Users/test/test1/node_modules/soap/node_modules/node-expat > node-waf configure build Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : […]