Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

How to use node-sass in developing VSCode extensions?

$
0
0

I'm trying to make a VSCode extension for compiling SASS.

However, I have no experience developing VSCode extensions and node.js, so I could not find out the cause of an error with node-sass.

extension.ts:

import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {

    var ns = require('node-sass');

    let disposables = [];

    disposables.push(vscode.commands.registerCommand(
        'simpleSass.compileSass', () => {
            vscode.window.showInformationMessage('Compilation finished normally.');
        }
    ));

    context.subscriptions.push(
        ...disposables
    );
}

export function deactivate() {}

Error message:

Activating extension 'publisher.name' failed: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (73) For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v4.13.1.

However, I could compile SASS from the command line using the same version of node-sass on the same computer. I wondered if it's not an environmental problem.

How can I use node-sass in VSCode extensions?

(Sorry, I'm not a native English speaker. There may be something strange.)


Viewing all articles
Browse latest Browse all 97371

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>