Module parse failed: Unexpected token (16:0)
File was processed with these loaders:
* wallaby-loader
You may need an additional loader to handle the result of these loaders.
> :root {
| --color1: #dcedf4;
| --color2: #ebf5fa;
@ ./dist/<project-library-name>/<project-library-name>.css,
@ ./wallaby-styles.js
I tried to change the selector to 'html' and then I got the error on the '{' symbol:
Module parse failed: Unexpected token (16:5)
File was processed with these loaders:
* wallaby-loader
You may need an additional loader to handle the result of these loaders.
> html {
| --color1: #dcedf4;
| --color2: #ebf5fa;
@ ./dist/<project-library-name>/<project-library-name>.css,
@ ./wallaby-styles.js
Issue description or question
I get the following error message when starting:
I tried to change the selector to 'html' and then I got the error on the '{' symbol:
Wallaby diagnostics report
{ editorVersion: 'WebStorm 2022.2.3', pluginVersion: '1.0.253', editorType: 'IntelliJ', osVersion: 'win32 10.0.19044', nodeVersion: 'v18.12.1', coreVersion: '1.0.1347', checksum: 'YzBlZGE0MmY5MTUxMTI0YTUzYjc5NmNiZGI2YTEwMTksMTY5MzUyNjQwMDAwMCww', config: { diagnostics: { angular: { workspace: { '$schema': './node_modules/@angular/cli/lib/config/schema.json', schematics: { '@schematics/angular': { component: { changeDetection: 'OnPush' } }, '@angular-eslint/schematics:application': { setParserOptionsProject: true }, '@angular-eslint/schematics:library': { setParserOptionsProject: true } }, version: 1, newProjectRoot: 'projects', projects: { '-showcase': {
projectType: 'application',
schematics: { '@schematics/angular:component': { style: 'scss' }, '@schematics/angular:application': { strict: true } },
root: '',
sourceRoot: 'src',
prefix: 'app',
architect: {
build: {
builder: '@angular-devkit/build-angular:browser',
options: {
outputPath: 'dist/-showcase',
index: 'src/index.html',
main: 'src/main.ts',
polyfills: [ 'zone.js' ],
tsConfig: 'tsconfig.app.json',
inlineStyleLanguage: 'scss',
assets: [
'src/robots.txt',
'src/assets',
{ glob: '/*', input: './dist//assets/', output: './assets/' },
{ glob: 'CHANGELOG.md', input: '.', output: './assets/' },
{ glob: 'CHANGELOG_LATEST.md', input: '.', output: './assets/' }
],
styles: [ 'dist//.css', 'src/styles.scss' ],
scripts: []
},
configurations: {
production: {
fileReplacements: [ { replace: 'src/environments/environment.ts', with: 'src/environments/environment.prod.ts' } ],
tsConfig: 'tsconfig.app.prod.json',
index: 'src/index/prod/index.html',
outputHashing: 'all'
},
development: { buildOptimizer: false, optimization: false, vendorChunk: true, extractLicenses: false, sourceMap: true, namedChunks: true }
},
defaultConfiguration: 'production'
},
serve: {
builder: '@angular-devkit/build-angular:dev-server',
configurations: { production: { browserTarget: '-showcase:build:production' }, development: { browserTarget: '-showcase:build:development' } },
defaultConfiguration: 'development'
},
'extract-i18n': { builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: '-showcase:build' } },
test: {
builder: '@angular-devkit/build-angular:karma',
options: {
polyfills: [ 'zone.js', 'zone.js/testing' ],
tsConfig: 'tsconfig.spec.json',
karmaConfig: 'karma.conf.js',
inlineStyleLanguage: 'scss',
assets: [
'src/robots.txt',
'src/assets',
{ glob: '*/', input: './dist//assets/', output: './assets/' },
{ glob: 'CHANGELOG.md', input: '.', output: './assets/' },
{ glob: 'CHANGELOG_LATEST.md', input: '.', output: './assets/' }
],
styles: [ 'dist//.css', 'src/styles.scss' ],
scripts: []
}
},
lint: {
builder: '@krema/angular-eslint-stylelint-builder:lint',
options: {
eslintFilePatterns: [ 'src/ /*.ts', 'src//*.html', 'src/*/.js', '.ts', '.js' ],
eslintCache: true,
eslintCacheLocation: '.eslintcache',
stylelintFilePatterns: [ 'src//*.scss' ],
stylelintCache: true,
stylelintCacheLocation: '.stylelintcache',
maxWarnings: 0
}
}
}
},
'': {
projectType: 'library',
root: 'projects/',
sourceRoot: 'projects/',
prefix: '',
architect: {
build: {
builder: '@angular-devkit/build-angular:ng-packagr',
options: { project: 'projects//ng-package.json' },
configurations: { production: { tsConfig: 'projects//tsconfig.lib.prod.json' }, development: { tsConfig: 'projects//tsconfig.lib.json' } },
defaultConfiguration: 'production'
},
test: {
builder: '@angular-devkit/build-angular:karma',
options: {
tsConfig: 'projects//tsconfig.spec.json',
polyfills: [ 'zone.js', 'zone.js/testing' ],
karmaConfig: 'projects//karma.conf.js',
codeCoverageExclude: [ 'projects//src/lib/eem/client-information.ts' ],
assets: [ { glob: '/*', input: './dist//assets/', output: './assets/' } ]
}
},
lint: {
builder: '@krema/angular-eslint-stylelint-builder:lint',
options: {
eslintFilePatterns: [ 'projects//*/.ts', 'projects// /*.html', 'projects///*.js' ],
eslintCache: true,
eslintCacheLocation: 'projects//.eslintcache',
stylelintFilePatterns: [ 'projects//*/.scss' ],
stylelintCache: true,
stylelintCacheLocation: 'projects//.stylelintcache',
maxWarnings: 0
}
}
}
},
cypress: {
projectType: 'library',
root: 'cypress',
sourceRoot: 'cypress',
prefix: 'cypress',
architect: {
lint: {
builder: '@krema/angular-eslint-stylelint-builder:lint',
options: {
eslintConfig: 'cypress/.eslintrc.js',
eslintFilePatterns: [ 'cypress/ /*.ts', 'cypress//*.js' ],
eslintCache: true,
eslintCacheLocation: 'cypress/.eslintcache',
stylelintFilePatterns: [],
stylelintCache: true,
stylelintCacheLocation: 'cypress/.stylelintcache',
maxWarnings: 0
}
}
}
}
},
cli: { analytics: false }
},
tsConfig: '{
"compileOnSave":false,
"compilerOptions":{
"baseUrl":"./",
"outDir":"./dist/out-tsc",
"forceConsistentCasingInFileNames":true,
"strict":true,
"noImplicitOverride":true,
"noPropertyAccessFromIndexSignature":true,
"noImplicitReturns":true,
"noFallthroughCasesInSwitch":true,
"sourceMap":true,
"declaration":false,
"downlevelIteration":true,
"experimentalDecorators":true,
"moduleResolution":"node",
"importHelpers":true,
"target":"ES2022",
"module":"ES2022",
"useDefineForClassFields":false,
"lib":[
"ES2022",
"dom"
],
"paths":{
"@/":[
"projects//src/public_api"
],
},
"types":[
"jasmine",
"./projects//globals"
]
},
"angularCompilerOptions":{
"enableI18nLegacyMessageIdFormat":false,
"strictInjectionParameters":true,
"strictInputAccessModifiers":true,
"strictTemplates":true
},
"exclude":[
"cypress/cypress.config.ts"
],
"include":[
"src/*/.spec.ts",
"src/ /*.d.ts",
"projects///*.spec.ts",
"projects//*/.d.ts"
]
}',
polyfill: { path: 'C:\Users\\WebstormProjects\\wallaby-polyfills.js', code: "require('zone.js');" },
main: [
{
path: 'C:/Users//WebstormProjects//src/test.js',
code: '\n' +
' \n' +
" import 'zone.js/testing'; \n" +
" import { getTestBed } from '@angular/core/testing';\n" +
' \n' +
' import {\n' +
' BrowserDynamicTestingModule,\n' +
' platformBrowserDynamicTesting\n' +
" } from '@angular/platform-browser-dynamic/testing'; \n" +
' \n' +
' getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {\n' +
' errorOnUnknownElements: true,\n' +
' errorOnUnknownProperties: true\n' +
' });\n' +
' '
},
{
path: 'C:/Users//WebstormProjects//projects//test.js',
code: '\n \n \n \n \n \n \n \n '
}
]
}
},
testFramework: { version: 'jasmine@3.10.0', configurator: 'jasmine@2.1.3', reporter: 'jasmine@2.1.3', starter: 'jasmine@2.1.3', autoDetected: true },
env: { kind: 'chrome', type: 'browser', params: {}, viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
files: [
{ pattern: 'src/main.ts', ignore: true, trigger: true, load: true, file: true },
{ pattern: 'src/index.html', ignore: true, trigger: true, load: true, file: true },
{ pattern: 'src/test.base.ts', ignore: true, trigger: true, load: true, file: true },
{ pattern: 'src/test.wallaby.ts', ignore: true, trigger: true, load: true, file: true },
{ pattern: 'src/ /*.spec.ts', ignore: true, trigger: true, load: true, file: true },
{ pattern: 'src//*.+(ts|js)', load: false, ignore: false, trigger: true, order: 1 },
{ pattern: 'src/*/.+(css|less|scss|sass|styl|html|json|svg)', instrument: false, load: false, ignore: false, trigger: true, order: 2 },
{ pattern: 'projects//test.base.ts', ignore: true, trigger: true, load: true, file: true },
{ pattern: 'projects//test.wallaby.ts', ignore: true, trigger: true, load: true, file: true },
{ pattern: 'projects// /*.spec.ts', ignore: true, trigger: true, load: true, file: true },
{ pattern: 'projects///*.+(ts|js)', load: false, ignore: false, trigger: true, order: 3 },
{ pattern: 'projects//*/.+(css|less|scss|sass|styl|html|json|svg)', instrument: false, load: false, ignore: false, trigger: true, order: 4 }
],
tests: [
{ pattern: 'src/ /*.spec.ts', load: false, ignore: false, trigger: true, test: true, order: 5 },
{ pattern: 'projects///*.spec.ts', load: false, ignore: false, trigger: true, test: true, order: 6 }
],
filesWithNoCoverageCalculated: [],
runAllTestsInAffectedTestFile: false,
updateNoMoreThanOneSnapshotPerTestFileRun: false,
compilers: {},
smartStart: [ { test: true, source: false, pattern: '*/', startMode: 'open' }, { test: false, source: true, pattern: '/', startMode: 'edit' } ],
logLimits: { inline: { depth: 5, elements: 5000 }, values: { default: { stringLength: 200 }, autoExpand: { elements: 5000, stringLength: 8192, depth: 10 } } },
preprocessors: {},
maxConsoleMessagesPerTest: 100,
autoConsoleLog: true,
delays: { run: 0, edit: 100, update: 0 },
workers: { initial: 0, regular: 0, recycle: false },
teardown: undefined,
hints: {
ignoreCoverage: 'REGEXP /ignore coverage|istanbul ignore/',
ignoreCoverageForFile: 'REGEXP /ignore file coverage/',
commentAutoLog: '?',
testFileSelection: { include: 'REGEXP /file\.only/', exclude: 'REGEXP /file\.skip/' }
},
automaticTestFileSelection: true,
runSelectedTestsOnly: true,
mapConsoleMessagesStackTrace: false,
extensions: {},
reportUnhandledPromises: false,
throwOnBeforeUnload: true,
slowTestThreshold: 75,
lowCoverageThreshold: 80,
runAllTestsWhenNoAffectedTests: false,
configCode: 'auto.detect#1020715035',
testLocations: []
},
packageJSON: {
dependencies: {
'@angular/animations': '15.0.0',
'@angular/cdk': '15.0.0',
'@angular/common': '15.0.0',
'@angular/compiler': '15.0.0',
'@angular/core': '15.0.0',
'@angular/forms': '15.0.0',
'@angular/platform-browser': '15.0.0',
'@angular/platform-browser-dynamic': '15.0.0',
'@angular/router': '15.0.0',
'angular-oauth2-oidc': '13.0.1',
'eck-autocomplete': '1.1.1',
highcharts: '10.2.1',
marked: '4.2.2',
prismjs: '1.29.0',
rxjs: '7.5.7',
tslib: '2.4.1',
'zone.js': '0.12.0'
},
devDependencies: {
'@angular-devkit/build-angular': '15.0.0',
'@angular-devkit/core': '15.0.0',
'@angular-devkit/schematics': '15.0.0',
'@angular-eslint/builder': '15.0.0',
'@angular-eslint/eslint-plugin': '15.0.0',
'@angular-eslint/eslint-plugin-template': '15.0.0',
'@angular-eslint/schematics': '15.0.0',
'@angular-eslint/template-parser': '15.0.0',
'@angular/cli': '15.0.0',
'@angular/compiler-cli': '15.0.0',
'@commitlint/cli': '17.1.2',
'@krema/angular-eslint-stylelint-builder': '1.3.0',
'@schematics/angular': '15.0.0',
'@types/jasmine': '4.3.0',
'@types/marked': '4.0.7',
'@types/node': '18.11.5',
'@types/prismjs': '1.26.0',
'@typescript-eslint/eslint-plugin': '5.43.0',
'@typescript-eslint/parser': '5.43.0',
backstopjs: '6.1.3',
'chrome-launcher': '0.15.1',
copyfiles: '2.4.1',
cypress: '10.10.0',
'cypress-fail-on-console-error': '3.3.1',
'cypress-log-to-output': '1.1.2',
eslint: '8.28.0',
'eslint-config-airbnb': '19.0.4',
'eslint-config-airbnb-base': '15.0.0',
'eslint-config-airbnb-typescript': '17.0.0',
'eslint-config-prettier': '8.5.0',
'eslint-plugin-cypress': '2.12.1',
'eslint-plugin-eslint-comments': '3.2.0',
'eslint-plugin-import': '2.26.0',
'eslint-plugin-jsdoc': '39.3.6',
'eslint-plugin-prefer-arrow': '1.2.3',
'eslint-plugin-sort-class-members': '1.15.2',
'eslint-plugin-unicorn': '44.0.2',
husky: '8.0.1',
'jasmine-core': '4.4.0',
'junit-report-merger': '4.0.0',
karma: '6.4.1',
'karma-chrome-launcher': '3.1.1',
'karma-coverage': '2.2.0',
'karma-jasmine': '5.1.0',
'karma-jasmine-html-reporter': '2.0.0',
'karma-spec-reporter': '0.0.34',
lighthouse: '9.6.7',
'ng-packagr': '15.0.0',
prettier: '2.7.1',
sass: '1.55.0',
stylelint: '14.13.0',
'stylelint-config-prettier': '9.0.3',
'stylelint-config-sass-guidelines': '9.0.1',
'stylelint-config-standard': '28.0.0',
typescript: '4.8.4'
}
},
fs: { numberOfFiles: 1030 },
debug: [
'2022-11-28T10:57:09.746Z config Attempting automatic configuration for angular\n',
'2022-11-28T10:57:09.751Z angular/cli config Detected Angular CLI.\n',
'2022-11-28T10:57:09.754Z angular/cli config Angular currentDirPath: "C:\Users\\WebstormProjects\", workspaceDirPath: "C:\Users\\WebstormProjects\"\n',
'2022-11-28T10:57:13.216Z angular/cli karma workspace config Using default C:/Users//WebstormProjects//src/test.js.\n',
'2022-11-28T10:57:13.216Z angular/cli karma workspace config Using default C:/Users//WebstormProjects//projects//test.js.\n',
'2022-11-28T10:57:13.218Z angular/cli karma workspace config Using virtual C:\Users\\WebstormProjects\\tsconfig.wallaby.spec.json.\n',
'2022-11-28T10:57:15.225Z config Finished attempting automatic configuration for angular (5479ms)\n',
'2022-11-28T10:57:15.228Z project Wallaby Node version: v18.12.1\n',
'2022-11-28T10:57:15.228Z project Wallaby config: C:\Users\\WebstormProjects\\auto.detect\n',
'2022-11-28T10:57:15.252Z fs File system starting\n',
'2022-11-28T10:57:19.574Z fs File system scan completed\n',
'2022-11-28T10:57:19.588Z project File cache: C:\Users\\AppData\Local\JetBrains\WebStorm2022.2\wallaby\projects\dfe7513e8ce669d7\n',
'2022-11-28T10:57:19.906Z uiService Listening port 51235\n',
'2022-11-28T10:57:20.054Z workers Parallelism for initial run: 6, for regular run: 3\n',
'2022-11-28T10:57:20.054Z workers Starting run worker instance #0\n',
'2022-11-28T10:57:20.054Z workers Starting run worker instance #1\n',
'2022-11-28T10:57:20.054Z workers Starting run worker instance #2\n',
'2022-11-28T10:57:20.054Z workers Starting run worker instance #3\n',
'2022-11-28T10:57:20.054Z workers Starting run worker instance #4\n',
'2022-11-28T10:57:20.054Z workers Starting run worker instance #5\n',
'2022-11-28T10:57:20.059Z workers Web server is listening at 53540\n',
'2022-11-28T10:57:20.084Z project Stopping process pool\n',
'2022-11-28T10:57:20.084Z project File cache is up-to-date, starting full test run\n',
'2022-11-28T10:57:20.087Z project Running postprocessor\n',
'2022-11-28T10:57:20.100Z postprocessor Processing started.\n',
'2022-11-28T10:57:20.100Z postprocessor Initializing.\n',
'2022-11-28T10:57:20.102Z postprocessor Initializing entry.\n',
'2022-11-28T10:57:20.102Z postprocessor Sanitizing configuration.\n',
'2022-11-28T10:57:20.102Z postprocessor Adjusting configuration.\n',
'2022-11-28T10:57:20.111Z postprocessor Creating compiler.\n',
'2022-11-28T10:57:20.779Z postprocessor Customizing compiler.\n',
'2022-11-28T10:57:20.779Z postprocessor Compilation started.\n',
'2022-11-28T10:57:33.554Z workers Started run worker instance (immediate) #0\n',
'2022-11-28T10:57:33.554Z workers Started run worker instance (immediate) #1\n',
'2022-11-28T10:57:33.554Z workers Started run worker instance (immediate) #2\n',
'2022-11-28T10:57:33.554Z workers Started run worker instance (immediate) #3\n',
'2022-11-28T10:57:33.554Z workers Started run worker instance (immediate) #4\n',
'2022-11-28T10:57:33.554Z workers Started run worker instance (immediate) #5\n',
'2022-11-28T10:57:35.207Z project Error: Module parse failed: Unexpected token (16:5)\n' +
'File was processed with these loaders:\n' +
' wallaby-loader\n' +
'You may need an additional loader to handle the result of these loaders.\n' +
'> html {\n' +
'| --color1: #dcedf4;\n' +
'| --color2: #ebf5fa;\n' +
'@ ./dist//.css,\n' +
'@ ./wallaby-styles.js\n' +
' at t. (C:\Users\\AppData\Local\JetBrains\WebStorm2022.2\wallaby\wallaby\server.js:23:10957)\n' +
' at r (C:\Users\\AppData\Local\JetBrains\WebStorm2022.2\wallaby\wallaby\server.js:23:7208)\n' +
' at Object.next (C:\Users\\AppData\Local\JetBrains\WebStorm2022.2\wallaby\wallaby\server.js:23:6503)\n' +
' at o (C:\Users\\AppData\Local\JetBrains\WebStorm2022.2\wallaby\wallaby\server.js:23:6262)\n',
'2022-11-28T10:57:35.209Z project Test run finished\n',
'2022-11-28T10:57:35.209Z project Test run data re-queued\n'
]
}