Looking at this code, there could be several possible reasons as to why this isn't working.
1. Importing the package properly:
Try changing the first two lines to this:
import { Highway } from '@dogstudio/highway';
import { Fade } from './transition';
2. Installing the package properly:
Over on the installation documentation (for Highway
) it says to install it using NPM, you'd use the following command:
npm install --save-dev @dogstudio/highway
You'd then import Highway
as you did before, like this:
import Highway from '@dogstudio/highway';
WARNING: if you get a "permissions error" you'll have to use sudo
(put it before npm
) to grant your user access files/folders that require elevated privileges.
3. Setting up an NPM project:
Use npm init -y
to set up an npm
project in your current directory, omit the -y
option to manually make the decisions.
Good luck.