Tag: npm

在Visual Studio的预生成中使用webpack

我有两个命令: npm run build – 调用webpack来编译我所有的.js npm run dev – 调用webpack -w ,编译我所有的.js,并保持在监视模式,寻找变化。 我想将它与Visual Studio的版本集成,所以我进入了属性 – >生成事件 – >预生成 if $(ConfigurationName) == Debug ( npm –prefix ../ run dev ) ELSE ( npm –prefix ../ run build ) 这个逻辑起作用。 如果我处于发布模式,它将简单地捆绑我的文件,服务器将运行。 但问题是在debugging模式下,因为webpack -w不会结束,构build也永远不会结束,它期望一个退出代码…. 所以我试图智取Visual Studio,并开始一个新的CMD过程,不会阻止构build的开始: start cmd /K npm –prefix ../ run dev 不幸的是,Visual Studio对我来说太聪明了。 所以问题是:有没有什么聪明的方法让视觉工作室在预编译命令中简单地运行我想要的,而不是等待它完成? […]

我得到了npm run dev和npm在nuxt.js中运行生成错误

在Mac上开发。 从以下命令开始: vue init nuxt / express myproject 开发之后,准备在真实的服务器上构build。 (ubuntu)真实服务器的configuration如下。 ├── @ nuxtjs / axios @ 4.4.0 ├── alertify.js@1.0.12 ├── axios@0.16.2 ├── babel-polyfill@6.26.0 ├── body-parser@1.18.2 ├── bootstrap@4.0.0-beta.2 ├── connect-redis@3.3.2 ├── cookie-parser@1.4.3 ├── cross-env@5.1.0 ├── express@4.16.2 ├── express-session@1.15.6 ├── fs@0.0.1-security ├── jquery@3.2.1 ├── lodash@4.17.4 ├── moment@2.19.1 ├── node@8.3.0 ├── nuxt@1.0.0-rc9 ├── passport@0.4.0 ├── passport-local@1.0.0 ├── pg-promise@7.0.2 […]

Npm运行并行脚本无法正常工作

脚本的目标是保持重试连接到服务器端点,并在可能时生成graphql模式。 如果我在另一个命令提示符下运行脚本,脚本工作正常。 这只是我想在一个命令提示符下运行一个命令。 相反,我得到的错误: (节点:4212)MaxListenersExceededWarning:检测到可能的EventEmitter内存泄漏。 添加了11个结束监听器。 使用emitter.setMaxListeners()来增加限制 这对我来说没有任何意义,因为听众应该只设置一次,而不是11次。 dotnet-run只运行asp.net服务器。 显然,这需要一些时间来启动,这就是为什么我写这个脚本,以保持重试到服务器。 "start": "npm-run-all –parallel dotnet-run get-schema:dev", "get-schema:dev": "node scripts/getSchema.js –url http://localhost:8080/graphql" 我正在使用npm-run-all npm软件包 getSchema脚本: require('isomorphic-fetch'); const getArgs = require('get-args'); const FormData = require('form-data'); const fs = require('fs'); const { buildClientSchema, introspectionQuery, printSchema, } = require('graphql/utilities'); const path = require('path'); const schemaPath = path.join(__dirname, '../schema/schema'); const formData […]

使用手写笔与Webpack(手表)

我开始使用一个JS应用程序,使用Babel + Webpack + Npm,我的样式是用手写笔完成的,因为我使用的是我build立的Webpack运行命令,所以我想用它来运行我通常使用的命令手写笔: stylus -u nib -w ./app/stylus/ –out ./app/stylesheets 这是我的package.json { "name": "catch-and-run", "version": "1.0.0", "description": "Catch and Run game! DOOM 1993 Inspired", "main": "./app/javascripts/main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack –progress -p", "watch": "webpack –progress –watch" }, "repository": { "type": "git", "url": "git+https://github.com/Nikodermus/catch-and-run-game.git" }, […]

在Windows 7中重新启动npm启动错误

如何解决这个问题。 在这里,我需要重新解决这个问题在Windows 7 64位。 我在Windows 7中安装nodejs并打开我input的命令提示符 npm版本 'CALL "C:\Program Files\nodejs\\node.exe" "C:\ProgramFiles\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,operable program or batch file. { 'angular-quickstart': '1.0.0', npm: '3.10.10', ares: '1.10.1-DEV', http_parser: '2.7.0', icu: '58.2', modules: '48', node: '6.11.4', openssl: '1.0.2l', uv: '1.11.0', v8: '5.1.281.108', zlib: '1.2.11' } 而我创build项目文件夹我安装angularjs时,我安装npm其工作正常,但我给了像这样的命令 E:\project\Demo>npm start 'CALL "C:\Program […]

节点cmd在fsevents点执行'npm install'时挂起

我试图通过npm命令“npm install”来安装anugalr2。 但是当它达到某个点时,就是在fsevets。 命令提示符卡住了。 之后没有任何事情发生。 PFb cmd图像 任何build议/意见将有所帮助 更新: 当我尝试用npm i –no-optional 。 它被困在“”core-js“软件包中 D:\Angular2\quickstart-master>npm i –no-optional npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or highe to avoid a RegExp DoS issue npm WARN deprecated express@2.5.11: express 2.x series is deprecated npm WARN deprecated connect@1.9.2: connect 1.x series is deprecated [ ……] – […]

npm install –save-dev @ ts2.0无效的标签名称“@ ts2.0”

所以当我input: npm install @ts2.0 –save-dev 我有这个错误: npm ERR! 代码EINVALIDTAGNAME npm ERR! 无效的标签名称“@ ts2.0”:标签可能没有任何encodeURIComponent编码的字符。 任何想法为什么? 问候和感谢

如何使用AWS EB扩展编译Vuejs组件?

我在安装Nodejs和进一步在AWS Elastic Beanstalk上运行“ npm run production ”时遇到问题。 我正在编写configuration,并尝试了多个,但他们都不允许我安装nodejs。 我试图手动安装节点SSH到远程机器并运行: “ sudo yum -y install nodejs npm –enablerepo-epel ” 但它安装了节点v0.10,然后我无法运行“ npm run prod ”(我猜这是因为Laravel Homestead默认使用节点v6.11。

升级node / npm后需要npm install?

我试图了解是否有必要在从6.x升级到8.x节点之后运行npm install。 如果是这样,你能解释为什么这样做? 我很难find一些文件。

在Laravel 5.4中,资产编译失败

在编译laravel资源时抛出错误: ERROR Failed to compile with 2 errors error in ./resources/assets/sass/app.scss Module build failed: Error: Missing binding /media/xxx/workspace/Projects/Laravel-blog/node_modules/node-sass/vendor/linux-ia32-57/binding.node Node Sass could not find a binding for your current environment: Linux 32-bit with Node.js 8.x Found bindings for the following environments: – Linux 32-bit with Node.js 7.x 的package.json { "private": true, "scripts": { "dev": "NODE_ENV=development node_modules/webpack/bin/webpack.js […]