I am trying to update an older NPM/Node codebase to get things to compile properly when I run npm run build and I am having problems with it spitting out a ton of scss related issues.
Error message: You may need an additional loader to handle the result of these loaders
Full Error Message:
ERROR in ./src/containers/App/styles/app.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleParseError: Module parse failed: Unexpected character '#' (5:0)
File was processed with these loaders:
* ./node_modules/sass-loader/lib/loader.js
You may need an additional loader to handle the result of these loaders.
| Fonts
| */
> #font-face {
| font-family: 'Roboto';
| src: url(//fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap&subset=cyrillic-ex) format("truetype"); }
at handleParseError (/var/www/FlaskApp/people-app/static/node_modules/webpack/lib/NormalModule.js:450:19)
at doBuild.err (/var/www/FlaskApp/people-app/static/node_modules/webpack/lib/NormalModule.js:484:5)
at runLoaders (/var/www/FlaskApp/people-app/static/node_modules/webpack/lib/NormalModule.js:343:12)
at /var/www/FlaskApp/people-app/static/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/var/www/FlaskApp/people-app/static/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/var/www/FlaskApp/people-app/static/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /var/www/FlaskApp/people-app/static/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at context.callback (/var/www/FlaskApp/people-app/static/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.render [as callback] (/var/www/FlaskApp/people-app/static/node_modules/sass-loader/lib/loader.js:76:9)
at Object.done [as callback] (/var/www/FlaskApp/people-app/static/node_modules/neo-async/async.js:8067:18)
at options.success (/var/www/FlaskApp/people-app/static/node_modules/node-sass/lib/index.js:308:32)
# ./src/containers/App/index.js 40:0-28
# ./src/index.js
# multi bootstrap-loader ./src/index ./src
app.scss:
/* global styles */
#import 'fonts/roboto';
#import 'typography';
#import 'links';
:global(body) {
position: relative;
font-family: 'Roboto', sans-serif !important;
h1, h2, h3, h4 {
font-weight: 300;
}
}
:global(.addIconDiv) {
position: relative;
display: inline-block;
}
:global(.addIconSpinner) {
position: absolute;
top: -6px;
left: -6px;
}
:global(.editIconSpinner) {
position: absolute;
top: 50%;
left: 45%;
margin-top: -12px;
margin-left: -12px;
}
roboto.scss:
#font-face {
font-family: 'Roboto';
src: url(//fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap&subset=cyrillic-ex) format('truetype')
}
webpack dev.config.js:
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const autoprefixer = require('autoprefixer');
const postcssImport = require('postcss-import');
module.exports = {
mode: 'development',
devtool: 'cheap-module-eval-source-map',
entry: [
'bootstrap-loader',
'webpack-hot-middleware/client',
'./src/index',
],
output: {
publicPath: '/dist/',
},
module: {
rules: [
{
test: /\.scss$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
// you can specify a publicPath here
// by default it uses publicPath in webpackOptions.output
publicPath: '../',
hmr: process.env.NODE_ENV === 'development',
},
},
'sass-loader',
],
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"development"',
},
__DEVELOPMENT__: true,
}),
new MiniCssExtractPlugin({
filename: 'bundle.css',
}),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(), //no pings back to webpack "_hrm"
new webpack.NoEmitOnErrorsPlugin(),
new webpack.ProvidePlugin({
jQuery: 'jquery',
}),
],
};
npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm#3.5.2
3 info using node#v8.10.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle redux-easy-boilerplate#1.3.3~prebuild: redux-easy-boilerplate#1.3.3
6 silly lifecycle redux-easy-boilerplate#1.3.3~prebuild: no script for prebuild, continuing
7 info lifecycle redux-easy-boilerplate#1.3.3~build: redux-easy-boilerplate#1.3.3
8 verbose lifecycle redux-easy-boilerplate#1.3.3~build: unsafe-perm in lifecycle true
9 verbose lifecycle redux-easy-boilerplate#1.3.3~build: PATH: /usr/share/npm/bin/node-gyp-bin:/var/www/FlaskApp/people-app/static/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
10 verbose lifecycle redux-easy-boilerplate#1.3.3~build: CWD: /var/www/FlaskApp/people-app/static
11 silly lifecycle redux-easy-boilerplate#1.3.3~build: Args: [ '-c',
11 silly lifecycle 'webpack --progress --verbose --colors --display-error-details --config webpack/common.config.js' ]
12 silly lifecycle redux-easy-boilerplate#1.3.3~build: Returned: code: 2 signal: null
13 info lifecycle redux-easy-boilerplate#1.3.3~build: Failed to exec build script
14 verbose stack Error: redux-easy-boilerplate#1.3.3 build: `webpack --progress --verbose --colors --display-error-details --config webpack/common.config.js`
14 verbose stack Exit status 2
14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at EventEmitter.emit (events.js:214:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at ChildProcess.emit (events.js:214:7)
14 verbose stack at maybeClose (internal/child_process.js:925:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid redux-easy-boilerplate#1.3.3
16 verbose cwd /var/www/FlaskApp/people-app/static
17 error Linux 4.15.0-51-generic
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
19 error node v8.10.0
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error redux-easy-boilerplate#1.3.3 build: `webpack --progress --verbose --colors --display-error-details --config webpack/common.config.js`
22 error Exit status 2
23 error Failed at the redux-easy-boilerplate#1.3.3 build script 'webpack --progress --verbose --colors --display-error-details --config webpack/common.config.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the redux-easy-boilerplate package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error webpack --progress --verbose --colors --display-error-details --config webpack/common.config.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs redux-easy-boilerplate
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls redux-easy-boilerplate
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Related
I started learning webpack. I am aware that webpack4 doesnt require a configuration explicitly. I created one for my project. On every build i see it picking up default config.
below is my package.json
{
"name": "feedback-clientlibs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack"
},
"keywords": [],
"author": "hkesani",
"license": "ISC",
"devDependencies": {
"css-loader": "^3.5.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
},
"dependencies": {
"lodash": "^4.17.15"
}
}
and my webpack.config.js is as follows
var path = require('path');
module.export ={
entry : './js/feedback.js',
mode:'none',
output : {
filename:'feedback.js',
path:path.resolve(__dirname,'webpack.modules')
},
module:{
rules:[
{
test:/\.css$/,
use:['css-loader']
}
]
}
}
I have few css imports into the js files as below
import '../css/feedback.css'
import '../css/all.css'
whenever i run a build (i have cssloader installed) below is what i see
$ npm run build
> feedback-clientlibs#1.0.0 build C:\projects\br_translation\jcr\code\jcr_root\apps\r\dcloud\components\clientlibs\feedback-clientlibs
> webpack
Hash: 7c51d9af54f992c3e551
Version: webpack 4.43.0
Time: 106ms
Built at: 05/10/2020 10:39:42 PM
1 asset
Entrypoint main = main.js
[0] ./src/index.js 6.17 KiB {0} [built]
[1] ./css/feedback.css 302 bytes {0} [built] [failed] [1 error]
[2] ./css/all.css 292 bytes {0} [built] [failed] [1 error]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
ERROR in ./css/feedback.css 1:0
Module parse failed: Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> #feedback {
| height: 5em;
| padding: 10px 22px 8px 22px;
# ./src/index.js 1:0-28
ERROR in ./css/all.css 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> .ratings-stars {
| margin-bottom: 15px;
| height: 13px;
# ./src/index.js 2:0-23
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! feedback-clientlibs#1.0.0 build: `webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the feedback-clientlibs#1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hkesani\AppData\Roaming\npm-cache\_logs\2020-05-10T17_09_42_363Z-debug.log
Any help is appreciated.
Thanks
Have you tried it with style-loader?
npm install --save-dev style-loader
And update your webpack.config.js rules to:
rules: [
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
}
]
I also notice you did not supply a production flag for your webpack command I would update that script to run:
webpack --mode production -p
Then in your output path try a directory name without the period. This may or may not be the reason but it is normally a naming convention to use a dash or underscore for directory names.
path: path.resolve(__dirname,'webpack_modules')
I think it's defined [here]enter link description here.
It can also be inspected via node:
const webpack = require('webpack')
new webpack.WebpackOptionsDefaulter()
I have been getting this error for days now and I am not sure how to fix it.
When I run the "dev" package in Node Task Runner Explorer it gives this error.
It seems to be something to do with different versions of node and webpack not getting along. the error message, and my packages.json file are below, as is the link to the article I am working through.
setting-up-a-react-environment-for-aspnet-mvc-44la
Error Message
C:\DevFolder\MyApplication> cmd.exe /c npm run dev --color=always
asp.net#1.0.0 dev C:\DevFolder\MyApplication
webpack --mode development --watch C:\DevFolder\MyApplication\node_modules\webpack\bin\webpack.js:90 let
notify = ^^^ SyntaxError: Block-scoped declarations (let, const,
function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:430:10)
at startup (node.js:141:18)
at node.js:980:3 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! asp.net#1.0.0 dev: `webpack --mode development --watch` npm ERR!
Exit status 1 npm ERR! npm ERR! Failed at the asp.net#1.0.0 dev
script. npm ERR! This is probably not a problem with npm. There is
likely additional logging output above.
package.json
{
"version": "1.0.0",
"name": "asp.net",
"private": true,
"scripts": {
"build": "webpack",
"dev": "webpack --mode development --watch"
},
"devDependencies": {
"#babel/cli": "^7.7.5",
"#babel/core": "^7.7.5",
"#babel/plugin-proposal-class-properties": "^7.7.4",
"#babel/preset-env": "^7.7.6",
"#babel/preset-react": "^7.7.4",
"babel-loader": "^8.0.6",
"browser-sync": "^2.26.7",
"browser-sync-webpack-plugin": "^2.2.2",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-notifier": "^1.8.0"
},
"dependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0",
"npm": "6.12.1",
"node" : "5.3.0"
}
}
Webpack Config
"use strict";
var path = require("path");
var WebpackNotifierPlugin = require("webpack-notifier");
var BrowserSyncPlugin = require("browser-sync-webpack-plugin");
module.exports = {
entry: "./Scripts/ApplicationReact/ApplicationReact.js",
output: {
path: path.resolve(__dirname, "./Scripts/"),
filename: "bundle.js"
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}
]
},
devtool: "inline-source-map",
plugins: [new WebpackNotifierPlugin(), new BrowserSyncPlugin()]
};
Summary
Don't install the Node.js nuget package, it breaks your project and it will remain broken after you have removed it. Just let the general installation of node do the work.
Detail
When in any other directory, if I did "node -v" in the command line and it would return version 12.13.1
When in my project folder if I did "node -v" it would return 5.3.0
When I removed the Node.js nuget package I thought it would default to the system version but instead it just said "cannot find the file or command specified" (or something along those lines).
I had copied the whole of our software to another folder for the purposes of this exercise. I just branched to another folder and this time the "node -v" was coming back with 12.13.1
I carried on with the exercise and the error did not appear. I am not sure how to fix it once you get into this state.
Better answers?
This isn't a great answer and I won't mark it as the answer. If anyone can provide a plausible explanation for what is going on here, and a way to cure your project from the nuget node lurgy, I will mark it as the answer.
I'm also going through Steven Foote's book Learning to Program and am currently on chapter 4, which uses Grunt. This post has a similar problem, but the problem is different (this person capitalized the "f" in Gruntfile.js).
I've seemed to have installed NPM and Node properly
npm#5.10.0 /usr/local/lib/node_modules/npm
andrews-macbook-air:Kittenbook Andrew$ node -v
v8.11.3
Here is my Gruntfile.js:
module.exports = function(grunt){
grunt.initConfig({
concat: {
release: {
src: ['js/values.js', 'js/prompt.js'],
dest: 'release/main.js'
}
},
copy: {
release: {
src: 'manifest.json',
dest: 'release/main.js'
}
},
jshint: {
files: ['js/values.js', 'js/prompt.js']
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTasks('default', ['jshint', 'concat' 'copy']);
In checking to see if I did it correctly I run grunt jshint in the command line, but I get back an error
andrews-macbook-air:Kittenbook Andrew$ grunt jshint
Loading "Gruntfile.js" tasks...ERROR
>> SyntaxError: Unexpected string
Warning: Task "jshint" not found. Use --force to continue.
Aborted due to warnings.
Any ideas on what is going on?
The initial layout in less. It is necessary to make, that media requests were disconnected -> the basic styles we take out in app.less, media - in media.less. Now you have to compile 2 css files from them and put them in a certain place.
For a basis took [https://github.com/vikpe/react-webpack-babel-starter] here this pig. Here webpack 3, more or less a fresh reagent and so on.
I put less-loader, I prescribe in common.js
{
test: /\.less$/,
use: [{
loader: "style-loader" // creates style nodes from JS strings
}, {
loader: "css-loader" // translates CSS into CommonJS
}, {
loader: "less-loader" // compiles Less to CSS
}],
},
in the react-component I import: import 'assets / less / app.less'; and import 'assets / less / media.less';
All works, but less was not recompiled in a css-file and it was built in html. Not the same. Next, the option for selling is indicated in the docks (Typically, it is recommended that you extract the style sheets to a separate file created with ExtractTextPlugin, so your styles do not depend on JavaScript.) I change the prod.js to
// production config
const merge = require('webpack-merge');
const {resolve} = require('path');
const commonConfig = require('./common');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const extractLess = new ExtractTextPlugin({
filename: "[name].[contenthash].css",
disable: process.env.NODE_ENV === "development"
});
module.exports = merge(commonConfig, {
entry: './index.js',
devtool: 'source-map',
output: {
filename: 'js/bundle.[hash].min.js',
path: resolve(__dirname, '../../dist'),
publicPath: '/',
},
module: {
rules: [{
test: /\.less$/,
use: extractLess.extract({
use: [{
loader: "css-loader"
}, {
loader: "less-loader"
}],
// use style-loader in development
fallback: "style-loader",
publicPath:"/css/"
})
}]
},
plugins: [
extractLess
]
});
I start npm run start-prod and as a result:
1. All styles are written in one css file (and I need it in 2), and not the one where I pointed in publicPath.
2. In the npm-debug.log errors
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\nodejs\\node.exe',
1 verbose cli 'D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'start-prod' ]
2 info using npm#4.0.5
3 info using node#v7.4.0
4 verbose run-script [ 'prestart-prod', 'start-prod', 'poststart-prod' ]
5 info lifecycle react-webpack-babel-starter#0.1.0~prestart-prod: react-webpack-babel-starter#0.1.0
6 silly lifecycle react-webpack-babel-starter#0.1.0~prestart-prod: no script for prestart-prod, continuing
7 info lifecycle react-webpack-babel-starter#0.1.0~start-prod: react-webpack-babel-starter#0.1.0
8 verbose lifecycle react-webpack-babel-starter#0.1.0~start-prod: unsafe-perm in lifecycle true
9 verbose lifecycle react-webpack-babel-starter#0.1.0~start-prod: PATH: D:\nodejs\node_modules\npm\bin\node-gyp-bin;F:\react-webpack-babel-starter-master-less\node_modules\.bin;C:\Users\daima\bin;D:\Git\mingw64\bin;D:\Git\usr\local\bin;D:\Git\usr\bin;D:\Git\usr\bin;D:\Git\mingw64\bin;D:\Git\usr\bin;C:\Users\daima\bin;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\Git\cmd;D:\nodejs;D:\Skype\Phone;C:\Program Files (x86)\QuickTime\QTSystem;D:\Visual Studio Code\bin;C:\Users\daima\AppData\Roaming\npm;D:\Git\usr\bin\vendor_perl;D:\Git\usr\bin\core_perl
10 verbose lifecycle react-webpack-babel-starter#0.1.0~start-prod: CWD: F:\react-webpack-babel-starter-master-less
11 silly lifecycle react-webpack-babel-starter#0.1.0~start-prod: Args: [ '/d /s /c', 'npm run build && node express.js' ]
12 silly lifecycle react-webpack-babel-starter#0.1.0~start-prod: Returned: code: 1 signal: null
13 info lifecycle react-webpack-babel-starter#0.1.0~start-prod: Failed to exec start-prod script
14 verbose stack Error: react-webpack-babel-starter#0.1.0 start-prod: `npm run build && node express.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (D:\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (D:\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:885:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid react-webpack-babel-starter#0.1.0
16 verbose cwd F:\react-webpack-babel-starter-master-less
17 error Windows_NT 6.1.7601
18 error argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start-prod"
19 error node v7.4.0
20 error npm v4.0.5
21 error code ELIFECYCLE
22 error react-webpack-babel-starter#0.1.0 start-prod: `npm run build && node express.js`
22 error Exit status 1
23 error Failed at the react-webpack-babel-starter#0.1.0 start-prod script 'npm run build && node express.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the react-webpack-babel-starter package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm run build && node express.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs react-webpack-babel-starter
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls react-webpack-babel-starter
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
How to solve my problem?
To get two css output files, you need to use two instances of the ExtractTextPlugin and configure two rules.
From the documentation
const ExtractTextPlugin = require('extract-text-webpack-plugin');
// Create multiple instances
const extractApp = new ExtractTextPlugin('stylesheets/[name]-one.css');
const extractMedia = new ExtractTextPlugin('stylesheets/[name]-two.css');
module.exports = {
module: {
rules: [
{
test: /app\.less$/,
use: extractApp.extract([ 'css-loader', 'less-loader' ])
},
{
test: /media\.less$/,
use: extractMedia.extract([ 'css-loader', 'less-loader' ])
},
]
},
plugins: [
extractApp,
extractMedia
]
};
When I execute the clean task (grunt clean), everything works as expected but when I run the watch task (grunt test), I get the following error:
util.js:35
var str = String(f).replace(formatRegExp, function(x) {
^
RangeError: Maximum call stack size exceeded
Here's my gruntfile
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
clean: ['tmpDir/']
watch:
options:
spawn: false
src:
tasks: ['clean']
files: [
src: 'client/assets/strings/en/str.coffee'
]
# plugins
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-watch')
# tasks
grunt.registerTask('test', ['watch'])
Here's my package.json file:
{
"author": "Your Name <Your Email>",
"name": "app-name",
"description": "Application description",
"version": "0.0.1",
"homepage": "",
"repository": {
"type": "git",
"url": ""
},
"engines": {
"node": "~0.10.28"
},
"scripts": {
"start": "muffin server"
},
"dependencies": {
"coffee-script": "~1.1.2",
"express": "~3.0.6",
"chai": "~1.4.2",
"underscore": "~1.4.3",
"wd": "0.0.27"
},
"devDependencies": {
"express": "~3.0.6",
"grunt": "^0.4.5",
"grunt-contrib-coffee": "^0.11.1",
"grunt-contrib-copy": "^0.6.0",
"grunt-contrib-less": "^0.11.4",
"grunt-contrib-watch": "^0.6.1",
"requirejs": "~2.0.1"
}
}
The output when I run with --verbose is the following:
Note: replaced base path with ***
Initializing
Command-line options: --verbose
Reading "gruntfile.coffee" Gruntfile...OK
Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK
Registering "grunt-contrib-clean" local Npm module tasks.
Reading /***/node_modules/grunt-contrib-clean/package.json...OK
Parsing /***/node_modules/grunt-contrib-clean/package.json...OK
Loading "clean.js" tasks...OK
+ clean
Registering "grunt-contrib-watch" local Npm module tasks.
Reading /***/node_modules/grunt-contrib-watch/package.json...OK
Parsing /***/node_modules/grunt-contrib-watch/package.json...OK
Loading "watch.js" tasks...OK
+ watch
Loading "gruntfile.coffee" tasks...OK
+ test
Running tasks: test
Running "test" task
Running "watch" task
Waiting...
Verifying property watch exists in config...OK
Verifying property watch.src.files exists in config...OK
Warning: Object #<Object> has no method 'indexOf'
Running "watch" task
Waiting...
Verifying property watch exists in config...OK
Verifying property watch.src.files exists in config...OK
Warning: Object #<Object> has no method 'indexOf'
... many of these
Running "watch" task
Waiting...
Verifying property watch exists in config...OK
Verifying property watch.src.files exists in config...OK
Warning: Object #<Object> has no method 'indexOf'
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
... many of these
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
util.js:35
var str = String(f).replace(formatRegExp, function(x) {
^
RangeError: Maximum call stack size exceeded
I finally figured out a similar problem I was having with spell. I was using
grunt.registerTask('spell', [ 'spell']);
The trick was that Grunt doesn't seem to like the repetition in names. When I switch to
grunt.registerTask('spellCheck', [ 'spell']);
Everything worked as it should.
may this help you
The files property takes an Array of file pattern strings. You've supplied an object it doesn't know how to interpret.
Change this:
files: [
src: 'client/assets/strings/en/str.coffee'
]
To this:
files: [
'client/assets/strings/en/str.coffee'
]