1

[15:03:25] [snowpack] Welcome to Snowpack! Because this is your first time running this project, Snowpack needs to prepare your dependencies. This is a one-time step and the results will be cached for the lifetime of your project. Please wait... [15:03:25] [snowpack] Package "fs" not found. Have you installed it?

When I try to start snowpack I got the error above... Is 'fs' not include in node by default? When I tried to install 'fs' via npm install fs, not started as well. Some of my files(test files) use 'fs' to run some tests...

Obs: I am using to import:

import fs from 'fs';//(not require('fs'))

Thanks. André

1 Answers1

0

I discovered how to deal with it in the snowpack website using the configuration in snowpack.config.js (packageOptions.external: ["fs", "path"])

module.exports = {

  packageOptions: {
    /* ... */
    external: ["fs", "path"]
  }
}