当 运行 一个 Gulp 任务时,节点 Sass 中的分段 11 错误
Segmentation 11 Error in Node Sass when running a Gulp Task
过去几个小时我一直在与这个问题作斗争,不幸的是,我在网上找到的所有修复都对我不起作用。
当 运行 执行 gulp 任务时,例如 gulp 部署(我正在为 Netsuite 开发)任务将 运行 直到编译 SASS 然后我得到这个错误:
/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/lib/parse.js:14
return a.value;
^
TypeError: Cannot read property 'value' of null
at /Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/lib/parse.js:14:15
at Array.map (native)
at valuesFromArrayExpression (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/lib/parse.js:13:26)
at walk.ancestor.CallExpression (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/lib/parse.js:77:22)
at c (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:47:18)
at Object.skipThrough (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:163:39)
at c (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:46:17)
at Object.base.ExpressionStatement (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:176:5)
at c (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:46:17)
at Object.skipThrough (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:163:39)
Segmentation fault: 11
我试过删除并重新安装节点模块,我也尝试过不同版本的节点,不幸的是我必须在 4.0.0 - LTS 之间使用,就像由 Suitecommerce Advanced 版本定义的一样我是使用。
我目前使用的是节点 4.9.1 和 npm 2.15.11。
Watch tasks 运行 没问题,只是在为生产环境编译SCSS时出现这个错误..
这是 package.json:
{
"name": "suitecommerce-builder",
"version": "0.0.1",
"description": "Sets of tasks to build a Reference Implementation",
"main": "gulpfile.js",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"amd-optimize": "0.3.1",
"archiver": "0.13.0",
"async": "0.9.0",
"cli-spinner": "0.1.5",
"del": "0.1.1",
"escodegen": "1.6.1",
"esprima": "1.2.5",
"estraverse": "1.9.3",
"express": "4.13.3",
"glob": "4.0.4",
"gulp": "3.8.7",
"gulp-add": "0.0.2",
"gulp-bless": "3.0.1",
"gulp-changed": "1.0.0",
"gulp-concat": "2.3.3",
"gulp-cssfmt": "^1.0.0",
"gulp-handlebars": "3.0.1",
"gulp-if": "1.2.5",
"gulp-insert": "0.4.0",
"gulp-jshint": "1.9.0",
"gulp-jst": "0.1.1",
"gulp-less": "1.3.6",
"gulp-livereload": "2.1.1",
"gulp-minify-css": "0.3.13",
"gulp-sass": "2.1.0",
"gulp-sourcemaps": "1.2.8",
"gulp-svg2ttf": "1.0.3",
"gulp-ttf2eot": "1.0.1",
"gulp-ttf2woff": "1.0.1",
"gulp-uglify": "0.3.1",
"gulp-util": "3.0.1",
"handlebars": "2.0.0",
"inquirer": "0.5.1",
"is-my-json-valid": "2.13.1",
"jshint-stylish": "1.0.0",
"jsonlint": "1.6.2",
"jsonpath-plus": "0.15.0",
"lazypipe": "0.2.2",
"lodash": "2.4.1",
"map-stream": "0.1.0",
"mime": "1.2.11",
"moment": "2.8.3",
"node-sass": "3.4.1",
"ns-uploader": "file:./ns_npm_repository/ns-uploader",
"progress": "1.1.7",
"q": "1.0.1",
"request": "2.39.0",
"serve-index": "1.7.2",
"shelljs": "^0.5.3",
"short-jsdoc": "0.2.4",
"sourcemap-to-ast": "0.0.2",
"through": "2.3.6",
"through2": "0.6.3",
"underscore": "1.6.0",
"vinyl": "0.4.6",
"xml2js": "0.4.5",
"yargs": "1.3.1",
"credentials-inquirer": "file:./ns_npm_repository/credentials-inquirer",
"suitetalk": "file:./ns_npm_repository/suitetalk4node",
"preconditions": "file:./ns_npm_repository/preconditions",
"xmlbuilder": "8.2.2"
},
"optionalDependencies": {
"minijasminenode2": "1.0.0",
"gulp-jasmine-phantom": "1.1.2",
"fsevents": "0.3.7"
}
}
非常感谢任何帮助?
谢谢!
我建议为 amd-optimizer 更新 package.json 的条目。 https://www.npmjs.com/package/gulp-amd-optimizer 上显示的最新版本是 0.6.0。
根据 https://docs.npmjs.com/cli/update,我建议使用 npm update 命令:
npm update amd-optimizer
您可能需要指定软件包版本,在这种情况下将为 amd-optimizer@0.6.0
请注意,npm update 还会根据文档页面更新 package.json
文件。
当运行此命令时,您可能需要在node_modules
目录中。
希望这对您有所帮助,
过去几个小时我一直在与这个问题作斗争,不幸的是,我在网上找到的所有修复都对我不起作用。
当 运行 执行 gulp 任务时,例如 gulp 部署(我正在为 Netsuite 开发)任务将 运行 直到编译 SASS 然后我得到这个错误:
/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/lib/parse.js:14
return a.value;
^
TypeError: Cannot read property 'value' of null
at /Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/lib/parse.js:14:15
at Array.map (native)
at valuesFromArrayExpression (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/lib/parse.js:13:26)
at walk.ancestor.CallExpression (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/lib/parse.js:77:22)
at c (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:47:18)
at Object.skipThrough (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:163:39)
at c (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:46:17)
at Object.base.ExpressionStatement (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:176:5)
at c (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:46:17)
at Object.skipThrough (/Users/chrismartyr/Documents/GitHub/ChannelTen/node_modules/amd-optimize/node_modules/acorn/util/walk.js:163:39)
Segmentation fault: 11
我试过删除并重新安装节点模块,我也尝试过不同版本的节点,不幸的是我必须在 4.0.0 - LTS 之间使用,就像由 Suitecommerce Advanced 版本定义的一样我是使用。
我目前使用的是节点 4.9.1 和 npm 2.15.11。
Watch tasks 运行 没问题,只是在为生产环境编译SCSS时出现这个错误..
这是 package.json:
{
"name": "suitecommerce-builder",
"version": "0.0.1",
"description": "Sets of tasks to build a Reference Implementation",
"main": "gulpfile.js",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"amd-optimize": "0.3.1",
"archiver": "0.13.0",
"async": "0.9.0",
"cli-spinner": "0.1.5",
"del": "0.1.1",
"escodegen": "1.6.1",
"esprima": "1.2.5",
"estraverse": "1.9.3",
"express": "4.13.3",
"glob": "4.0.4",
"gulp": "3.8.7",
"gulp-add": "0.0.2",
"gulp-bless": "3.0.1",
"gulp-changed": "1.0.0",
"gulp-concat": "2.3.3",
"gulp-cssfmt": "^1.0.0",
"gulp-handlebars": "3.0.1",
"gulp-if": "1.2.5",
"gulp-insert": "0.4.0",
"gulp-jshint": "1.9.0",
"gulp-jst": "0.1.1",
"gulp-less": "1.3.6",
"gulp-livereload": "2.1.1",
"gulp-minify-css": "0.3.13",
"gulp-sass": "2.1.0",
"gulp-sourcemaps": "1.2.8",
"gulp-svg2ttf": "1.0.3",
"gulp-ttf2eot": "1.0.1",
"gulp-ttf2woff": "1.0.1",
"gulp-uglify": "0.3.1",
"gulp-util": "3.0.1",
"handlebars": "2.0.0",
"inquirer": "0.5.1",
"is-my-json-valid": "2.13.1",
"jshint-stylish": "1.0.0",
"jsonlint": "1.6.2",
"jsonpath-plus": "0.15.0",
"lazypipe": "0.2.2",
"lodash": "2.4.1",
"map-stream": "0.1.0",
"mime": "1.2.11",
"moment": "2.8.3",
"node-sass": "3.4.1",
"ns-uploader": "file:./ns_npm_repository/ns-uploader",
"progress": "1.1.7",
"q": "1.0.1",
"request": "2.39.0",
"serve-index": "1.7.2",
"shelljs": "^0.5.3",
"short-jsdoc": "0.2.4",
"sourcemap-to-ast": "0.0.2",
"through": "2.3.6",
"through2": "0.6.3",
"underscore": "1.6.0",
"vinyl": "0.4.6",
"xml2js": "0.4.5",
"yargs": "1.3.1",
"credentials-inquirer": "file:./ns_npm_repository/credentials-inquirer",
"suitetalk": "file:./ns_npm_repository/suitetalk4node",
"preconditions": "file:./ns_npm_repository/preconditions",
"xmlbuilder": "8.2.2"
},
"optionalDependencies": {
"minijasminenode2": "1.0.0",
"gulp-jasmine-phantom": "1.1.2",
"fsevents": "0.3.7"
}
}
非常感谢任何帮助?
谢谢!
我建议为 amd-optimizer 更新 package.json 的条目。 https://www.npmjs.com/package/gulp-amd-optimizer 上显示的最新版本是 0.6.0。
根据 https://docs.npmjs.com/cli/update,我建议使用 npm update 命令:
npm update amd-optimizer
您可能需要指定软件包版本,在这种情况下将为 amd-optimizer@0.6.0
请注意,npm update 还会根据文档页面更新 package.json
文件。
当运行此命令时,您可能需要在node_modules
目录中。
希望这对您有所帮助,