Category : npm

I have this gulpfile.js: var gulp = require(‘gulp’) var bs = require(‘browser-sync’).create(); gulp.task(‘bs’, function (){ bs.init({ server: { watch: true, baseDir: "./", files:["css/*.css", "*.html"] } }); }); And these files: But upon running it via gulp bs, my console stuck to this ouput: And it can’t detect changes, hence hot reload. But if run it ..

Read more

I have some code in my sanity.ts file: import sanityClient from ‘@sanity/client’; // eslint-disable-next-line @typescript-eslint/no-var-requires const blocksToHtml = require(‘@sanity/block-content-to-html’); const client = sanityClient({ projectId: ”, dataset: ”, apiVersion: ‘2021-05-11′, token: String(process.env.SANITY_API_KEY), useCdn: false, }); export async function getData(): Promise<void> { const query = ”; const sanityResponse = await client.fetch(query); return; } I’m trying to mock ..

Read more

import Autocomplete from ‘@material-ui/lab/Autocomplete’; I have used the import like above. I am getting the below error Failed to compile. ./node_modules/@material-ui/lab/Autocomplete/Autocomplete.js Module not found: Can’t resolve ‘@material-ui/core/Autocomplete’ My dependencies are like "@material-ui/core": "^4.11.4", "@material-ui/lab": "^5.0.0-alpha.30", Source: Ask Javascript..

Read more

The issue I am facing is npm install locally doesn’t give much output with npm v6.14.9 but when deploying to server it gives some meaningless output like gyp info spawn args [‘some properties about Release’] make: entering directory ‘directory’ and then goes tonns of output about node-gyp and .cpp files which does not exist in ..

Read more