{"action":"created","issue":{"url":"https://api.github.com/repos/wallabyjs/public/issues/1693","repository_url":"https://api.github.com/repos/wallabyjs/public","labels_url":"https://api.github.com/repos/wallabyjs/public/issues/1693/labels{/name}","comments_url":"https://api.github.com/repos/wallabyjs/public/issues/1693/comments","events_url":"https://api.github.com/repos/wallabyjs/public/issues/1693/events","html_url":"https://github.com/wallabyjs/public/issues/1693","id":330285605,"node_id":"MDU6SXNzdWUzMzAyODU2MDU=","number":1693,"title":"Wallaby crashes trying to import *.less files from node_modules","user":{"login":"Timebutt","id":10674081,"node_id":"MDQ6VXNlcjEwNjc0MDgx","avatar_url":"https://avatars2.githubusercontent.com/u/10674081?v=4","gravatar_id":"","url":"https://api.github.com/users/Timebutt","html_url":"https://github.com/Timebutt","followers_url":"https://api.github.com/users/Timebutt/followers","following_url":"https://api.github.com/users/Timebutt/following{/other_user}","gists_url":"https://api.github.com/users/Timebutt/gists{/gist_id}","starred_url":"https://api.github.com/users/Timebutt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timebutt/subscriptions","organizations_url":"https://api.github.com/users/Timebutt/orgs","repos_url":"https://api.github.com/users/Timebutt/repos","events_url":"https://api.github.com/users/Timebutt/events{/privacy}","received_events_url":"https://api.github.com/users/Timebutt/received_events","type":"User","site_admin":false},"labels":[{"id":645070503,"node_id":"MDU6TGFiZWw2NDUwNzA1MDM=","url":"https://api.github.com/repos/wallabyjs/public/labels/configuration%20question","name":"configuration question","color":"d4c5f9","default":false},{"id":596831012,"node_id":"MDU6TGFiZWw1OTY4MzEwMTI=","url":"https://api.github.com/repos/wallabyjs/public/labels/solution%20suggested","name":"solution suggested","color":"0e8a16","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-06-07T13:59:46Z","updated_at":"2018-06-08T09:14:12Z","closed_at":"2018-06-08T05:35:30Z","author_association":"NONE","body":"### Issue description or question\r\n\r\nI'm currently adding Wallaby.js to an existing Angular 6 CLI project, and stumble upon a list of the following errors:\r\n\r\n```\r\n​​@import (reference) \"node_modules/sp-uikit/less/button\";​​\r\n​​@import (reference) 'node_modules/sp-uikit/style/atom/a-size';​​\r\n​​^​​\r\n​​Can't resolve './node_modules/sp-uikit/style/atom/a-size.less' in './src/common/containers/edit-app-details-modal'​​\r\n​​      in ./src/common/containers/edit-app-details-modal/edit-app-details-modal.container.less (line 5, column 0)​​\r\n​​    at runLoaders (/Users/nils.tijtgat/Showpad/Code/local-development/web-app-v2/node_modules/webpack/lib/NormalModule.js:252:20)​​\r\n​​    at /Users/nils.tijtgat/Showpad/Code/local-development/web-app-v2/node_modules/loader-runner/lib/LoaderRunner.js:364:11​​\r\n​​    at /Users/nils.tijtgat/Showpad/Code/local-development/web-app-v2/node_modules/loader-runner/lib/LoaderRunner.js:230:18​​\r\n​​    at context.callback (/Users/nils.tijtgat/Showpad/Code/local-development/web-app-v2/node_modules/loader-runner/lib/LoaderRunner.js:111:13)​​\r\n​​    at <anonymous>​​\r\n​​Module build failed: ​​\r\n```\r\n\r\nsp-uikit is an npm package we use to ship a lot of components and styles in our different repositories. What do I change to our Wallaby configuration to make this work? I started our configuration (see below) from the Angular 2+ example repository and made some tweaks to it, seems like I'm missing one though.\r\n\r\nThanks!\r\n\r\n### Wallaby.js configuration file\r\n\r\n```javascript\r\nvar wallabyWebpack = require('wallaby-webpack');\r\nvar path = require('path');\r\n\r\nvar compilerOptions = Object.assign(\r\n    require('./tsconfig.json').compilerOptions,\r\n    require('./src/tsconfig.spec.json').compilerOptions);\r\ncompilerOptions.module = 'CommonJs';\r\n\r\nmodule.exports = function (wallaby) {\r\n\r\n    var webpackPostprocessor = wallabyWebpack({\r\n        entryPatterns: [\r\n          'src/wallabyTest.js',\r\n          'src/**/*spec.js'\r\n        ],\r\n    \r\n        module: {\r\n          rules: [\r\n            {test: /\\.css$/, loader: ['raw-loader']},\r\n            {test: /\\.html$/, loader: 'raw-loader'},\r\n            {test: /\\.ts$/, loader: '@ngtools/webpack', include: /node_modules/, query: {tsConfigPath: 'tsconfig.json'}},\r\n            {test: /\\.js$/, loader: 'angular2-template-loader', exclude: /node_modules/},\r\n            {test: /\\.json$/, loader: 'json-loader'},\r\n            {test: /\\.styl$/, loaders: ['raw-loader', 'stylus-loader']},\r\n            {test: /\\.less$/, loaders: ['raw-loader', 'less-loader']},\r\n            {test: /\\.scss$|\\.sass$/, loaders: ['raw-loader', 'sass-loader']},\r\n            {test: /\\.(jpg|png)$/, loader: 'url-loader?limit=128000'}\r\n          ]\r\n        },\r\n    \r\n        resolve: {\r\n          extensions: ['.js', '.ts'],\r\n          modules: [\r\n            path.join(wallaby.projectCacheDir, 'src/app'),\r\n            path.join(wallaby.projectCacheDir, 'src'),\r\n            'node_modules'\r\n          ]\r\n        },\r\n        node: {\r\n          fs: 'empty',\r\n          net: 'empty',\r\n          tls: 'empty',\r\n          dns: 'empty'\r\n        }\r\n      });\r\n\r\n    return {\r\n        debug: true,\r\n        filesWithNoCoverageCalculated: [\r\n            'src/dealrooms/dealrooms.document-events.ts',\r\n            'src/**/*.builder.ts',\r\n            'src/*.ts',\r\n            'src/**/index.ts',\r\n            'src/**/routes.ts',\r\n            'src/bootstrap/*.ts',\r\n            'src/statemanagement/*.ts',\r\n            'src/**/customTypes/*.ts',\r\n            'src/**/*.factory.ts',\r\n            'src/**/*.ngfactory.ts'\r\n        ],\r\n        files: [\r\n            {pattern: 'src/**/*.+(ts|css|less|scss|sass|styl|html|json|svg)', load: false},\r\n            {pattern: 'src/**/*.d.ts', ignore: true},\r\n            {pattern: 'src/**/*spec.ts', ignore: true}\r\n        ],\r\n        tests: [\r\n            {pattern: 'src/**/*.spec.ts', load: false},\r\n            {pattern: 'node_modules/**/*.js', load: false, ignore: true, instrument: false}\r\n        ],\r\n        testFramework: 'jasmine',\r\n        compilers: {\r\n            '**/*.ts': wallaby.compilers.typeScript(compilerOptions)\r\n        },\r\n        middleware: function (app, express) {\r\n            var path = require('path');\r\n            app.use('/favicon.ico', express.static(path.join(__dirname, 'src/favicon.ico')));\r\n            app.use('/assets', express.static(path.join(__dirname, 'src/assets')));\r\n        },\r\n        postprocessor: webpackPostprocessor,\r\n        env: {\r\n            kind: 'chrome'\r\n        },\r\n        setup: function () {\r\n            window.__moduleBundler.loadTests();\r\n        }\r\n    };\r\n};\r\n\r\n```\r\n\r\n### Code editor or IDE name and version\r\n\r\nVisual Studio Code 1.24.0\r\nwallaby-webpack 3.9.9\r\n\r\n### OS name and version\r\n\r\nOSX 10.13.4\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/wallabyjs/public/issues/comments/395701618","html_url":"https://github.com/wallabyjs/public/issues/1693#issuecomment-395701618","issue_url":"https://api.github.com/repos/wallabyjs/public/issues/1693","id":395701618,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTcwMTYxOA==","user":{"login":"ArtemGovorov","id":979966,"node_id":"MDQ6VXNlcjk3OTk2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/979966?v=4","gravatar_id":"","url":"https://api.github.com/users/ArtemGovorov","html_url":"https://github.com/ArtemGovorov","followers_url":"https://api.github.com/users/ArtemGovorov/followers","following_url":"https://api.github.com/users/ArtemGovorov/following{/other_user}","gists_url":"https://api.github.com/users/ArtemGovorov/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtemGovorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtemGovorov/subscriptions","organizations_url":"https://api.github.com/users/ArtemGovorov/orgs","repos_url":"https://api.github.com/users/ArtemGovorov/repos","events_url":"https://api.github.com/users/ArtemGovorov/events{/privacy}","received_events_url":"https://api.github.com/users/ArtemGovorov/received_events","type":"User","site_admin":false},"created_at":"2018-06-08T09:14:12Z","updated_at":"2018-06-08T09:14:12Z","author_association":"MEMBER","body":"> First one is comparable with the very first issue I had importing .less files from node_modules. \r\n\r\nCould you please share some more details on how the `node_modules/@showpad/pdfjs-dist/web/pdf_viewer.css` file is imported and from what type of file?\r\n\r\n> Second one is more exotic, what's going on here?\r\n\r\nThe good thing is that it is the `Runtime error` (as opposed to build errors), so we are getting closer to running tests.\r\n\r\nI'm not sure what can be causing it though. From the stack trace it looks like it is something in the `src/common/components/node/node.component.spec.ts` spec file. Is there something that the file is doing differently from other files, perhaps extending Jasmine in some way?"}}
{"actor":{"display_login":"ArtemGovorov"}}